Skip to content

Commit

Permalink
fix: pass localProtocol to miniflare for https server (#1250)
Browse files Browse the repository at this point in the history
* fix: pass localProtocol to miniflare for https server

* Create friendly-news-cry.md

* missed a dep
  • Loading branch information
rozenmd authored Jun 14, 2022
1 parent 471cfef commit e3278fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/friendly-news-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

fix: pass localProtocol to miniflare for https server

Closes #1247
1 change: 1 addition & 0 deletions packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function DevSession(props: DevSessionProps) {
bundle={props.bundle}
format={props.entry.format}
compatibilityDate={props.compatibilityDate}
localProtocol={props.localProtocol}
compatibilityFlags={props.compatibilityFlags}
bindings={props.bindings}
assetPaths={props.assetPaths}
Expand Down
4 changes: 4 additions & 0 deletions packages/wrangler/src/dev/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface LocalProps {
compatibilityDate: string;
compatibilityFlags: string[] | undefined;
bindings: CfWorkerInit["bindings"];
localProtocol: "http" | "https";
assetPaths: AssetPaths | undefined;
public: string | undefined;
port: number;
Expand Down Expand Up @@ -54,6 +55,7 @@ function useLocalWorker({
rules,
enableLocalPersistence,
ip,
localProtocol,
crons,
}: LocalProps) {
// TODO: pass vars via command line
Expand Down Expand Up @@ -164,6 +166,7 @@ function useLocalWorker({
name: workerName,
port,
scriptPath,
https: localProtocol === "https",
host: ip,
modules: format === "modules",
modulesRules: (rules || [])
Expand Down Expand Up @@ -298,6 +301,7 @@ function useLocalWorker({
workerName,
format,
port,
localProtocol,
ip,
bindings.durable_objects?.bindings,
bindings.kv_namespaces,
Expand Down

0 comments on commit e3278fa

Please sign in to comment.