Skip to content

Commit

Permalink
fix: cors allow for alarm test #89
Browse files Browse the repository at this point in the history
  • Loading branch information
dragontaek-lee committed Jun 19, 2023
1 parent bff6880 commit 9558508
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 3002
}
1 change: 1 addition & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ export default {
webPushPublicKey: process.env.WEB_PUSH_PUBLIC_KEY as string,
webPushPrivateKey: process.env.WEB_PUSH_PRIVATE_KEY as string,
webPushSubject: process.env.WEB_PUSH_SUBJECT as string,
webPushURL: process.env.WEB_PUSH_TEST_URL as string,
};
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import errorHandler from "./middlewares/errorHandler";
import config from "./config";

const app = express();
const PORT = 3000;
const PORT = 3001;

app.use(
cors({
origin: [config.webURL, config.webLocal, config.webFlowerURL],
origin: [config.webURL, config.webLocal, config.webFlowerURL, config.webPushURL],
credentials: true,
})
);
Expand Down

0 comments on commit 9558508

Please sign in to comment.