Skip to content

Commit

Permalink
Local dev updates (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
cultpodcasts committed Jul 18, 2024
1 parent aa343b1 commit 6c3b15d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"start": "wrangler dev"
"start": "wrangler dev --local-protocol https"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240423.0",
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ const allowedOrigins: Array<string> = [
"https://cultpodcasts.com",
"http://localhost:4200",
"https://local.cultpodcasts.com:4200",
"https://localhost:4200"
"https://local.cultpodcasts.com:8788",
"https://localhost:4200",
"https://localhost:8790"
];

const stagingHostSuffix= ".website-83e.pages.dev";
const stagingHostSuffix = ".website-83e.pages.dev";

function getOrigin(origin: string | null | undefined) {
if (origin == null || (allowedOrigins.indexOf(origin.toLowerCase()) == -1 && !origin.endsWith(stagingHostSuffix))) {
Expand Down

0 comments on commit 6c3b15d

Please sign in to comment.