Skip to content

Commit

Permalink
Fixed minor Docker URL problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie6king committed Nov 19, 2024
1 parent 44d4d25 commit e230116
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ app.use((req, res, next) => {

const allowedOrigins = [
"http://localhost",
"http://127.0.0.1:8080"
"http://127.0.0.1:8080",
process.env.URL
];

if (allowedOrigins.includes(req.headers.origin)) {
Expand All @@ -50,7 +51,7 @@ app.use(express.static(path.join(__dirname, './client')));
app.use(express.static(path.join(__dirname, "./public")));

app.get("*", (req, res) => {
res.sendFile(path.join(__dirname, "../client/index.html"));
res.sendFile(path.join(__dirname, "./client/index.html"));
});

// return a list of 3 locations based on the supplied string
Expand Down

0 comments on commit e230116

Please sign in to comment.