Skip to content

Commit

Permalink
Merge pull request #109 from cthit/fix/auth-redirect
Browse files Browse the repository at this point in the history
Add env to set frontend url
  • Loading branch information
Oscariremma authored Jun 23, 2024
2 parents 51b66d1 + 81c86d8 commit 81ed39a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ CLIENT_SECRET=[client secret]
API_KEY=[api-key id]:[api-key] # pre-shared token
SECRET=some_random_long_string

FRONTEND_URL=http://localhost:3001 # URL to the frontend used for proxying

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASS=""
Expand Down
3 changes: 2 additions & 1 deletion backend/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ const setupGraphql = (app: express.Application, tools: Tools) => {

export const setupRoutes = (app: express.Application, tools: Tools) => {
setupGraphql(app, tools);
app.use("/", proxy("http://localhost:3001"));
const frontend_url = process.env.FRONTEND_URL || "http://localhost:3001";
app.use("/", proxy(frontend_url));
};

0 comments on commit 81ed39a

Please sign in to comment.