Skip to content

Commit

Permalink
front: support using front from outside the reverse proxy
Browse files Browse the repository at this point in the history
Signed-off-by: Élyse Viard <[email protected]>
  • Loading branch information
ElysaSrc committed Nov 15, 2024
1 parent 30ce451 commit e1541e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ services:
args:
OSRD_GIT_DESCRIBE: ${OSRD_GIT_DESCRIBE}
CARGO_PROFILE: dev
environment:
- RUST_LOG=debug
volumes:
- "./docker/gateway.dev.simple.toml:/gateway.toml"
restart: unless-stopped
Expand Down
2 changes: 1 addition & 1 deletion docker/gateway.dev.simple.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
secret_key = "NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET"

listen_addr = "0.0.0.0"
allowed_origins = ["http://localhost:3000"]
allowed_origins = ["http://127.0.0.1:3000", "http://localhost:3000"]

[telemetry.tracing]
enable = true
Expand Down
4 changes: 2 additions & 2 deletions front/src/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const MAIN_API = {
proxy_editoast: '/api',
proxy_gateway: '',
proxy_editoast: import.meta.env.VITE_PROXY_EDITOAST || '/api',
proxy_gateway: import.meta.env.VITE_PROXY_GATEWAY || '',
version: '0.0.1',
editor: {
component_identifier: { database: 'gaia', name: 'Test' },
Expand Down
2 changes: 2 additions & 0 deletions front/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

interface ImportMetaEnv {
OSRD_GIT_DESCRIBE: string;
PROXY_EDITOAST: string?;
PROXY_GATEWAY: string?;
}

0 comments on commit e1541e1

Please sign in to comment.