diff --git a/docker-compose.yml b/docker-compose.yml index 3a08f8dc128..7de55a3955b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/docker/gateway.dev.simple.toml b/docker/gateway.dev.simple.toml index b072a87075b..8a25868dd83 100644 --- a/docker/gateway.dev.simple.toml +++ b/docker/gateway.dev.simple.toml @@ -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 diff --git a/front/src/config/config.ts b/front/src/config/config.ts index 6583310576c..80bef25d656 100644 --- a/front/src/config/config.ts +++ b/front/src/config/config.ts @@ -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' }, diff --git a/front/src/vite-env.d.ts b/front/src/vite-env.d.ts index 706996d4fed..5d67be095ef 100644 --- a/front/src/vite-env.d.ts +++ b/front/src/vite-env.d.ts @@ -2,4 +2,6 @@ interface ImportMetaEnv { OSRD_GIT_DESCRIBE: string; + PROXY_EDITOAST: string?; + PROXY_GATEWAY: string?; }