forked from itsmejoeeey/docker-decap-cms-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix origins pattern to allow localhost and port (#19)
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/netlify-cms-github-oauth-provider/origins-pattern-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff --git a/login_script.js b/login_script.js | ||
index d7ef9ca..c8b8db3 100644 | ||
--- a/login_script.js | ||
+++ b/login_script.js | ||
@@ -1,5 +1,5 @@ | ||
const REQUIRED_ORIGIN_PATTERN = | ||
- /^((\*|([\w_-]{2,}))\.)*(([\w_-]{2,})\.)+(\w{2,})(\,((\*|([\w_-]{2,}))\.)*(([\w_-]{2,})\.)+(\w{2,}))*$/ | ||
+ /^((\*|\d.\d.\d.\d|[\w_-]{2,})+(\.([\w_-]{2,}))*)(:\d+)?$/ | ||
|
||
if (!process.env.ORIGINS.match(REQUIRED_ORIGIN_PATTERN)) { | ||
throw new Error('process.env.ORIGIN MUST be comma separated list \ |