Skip to content

Commit

Permalink
fix: renamed hosts to host. the value can be a string or an array of …
Browse files Browse the repository at this point in the history
…strings
  • Loading branch information
frankpagan committed Jun 10, 2023
1 parent 2521d26 commit 80a0cf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CoCreate.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
"name": "index.html",
"path": "/docs/authorize/index.html",
"src": "{{./docs/index.html}}",
"hosts": [
"host": [
"*",
"general.cocreate.app"
],
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@
return permission
if (permission.organization_id !== organization_id)
return false;
if (permission.hosts && permission.hosts.length) {
if (!permission.hosts || (!permission.hosts.includes(data.host) && !permission.hosts.includes("*")))
if (permission.host && permission.host.length) {
if (!permission.host || (!permission.host.includes(data.host) && !permission.host.includes("*")))
return false;

}
Expand Down

0 comments on commit 80a0cf6

Please sign in to comment.