Skip to content

Commit

Permalink
Merge pull request #108 from pvdthings/acoa-no-origin
Browse files Browse the repository at this point in the history
allow no origin
  • Loading branch information
dillonfagan authored Jan 11, 2025
2 parents 4914d3d + 4f4fe94 commit f09aa1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pvdthings-api",
"version": "1.22.1",
"version": "1.22.2",
"description": "",
"main": "server.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const corsOptions = Object.freeze({
],
credentials: true,
origin: (origin, callback) => {
if (allowedOrigins.includes(origin) || (!origin && isDevelopment())) {
if (allowedOrigins.includes(origin) || !origin) {
callback(null, true);
} else {
callback(new Error('Not allowed by CORS'));
Expand Down

0 comments on commit f09aa1a

Please sign in to comment.