Skip to content

Commit 3f8cf66

Browse files
committed
front: use browser relative path instead of env domain
1 parent 84d57c2 commit 3f8cf66

File tree

5 files changed

+2
-6
lines changed

5 files changed

+2
-6
lines changed

docker/gateway-entrypoint.sh

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/sh
22

33
>/tmp/front_config jq -rn '{
4-
OSRD_BACKEND_URL: env.OSRD_BACKEND_URL,
54
OSRD_SENTRY_DSN: env.OSRD_SENTRY_DSN,
65
OSRD_SENTRY_ENVIRONMENT: env.OSRD_SENTRY_ENVIRONMENT,
76
OSRD_GIT_DESCRIBE: env.OSRD_GIT_DESCRIBE,

front/.env.example

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
OSRD_BACKEND_URL=http://example.com/api
21
OSRD_SENTRY_DSN=https://[email protected]/42
32
OSRD_SENTRY_ENVIRONMENT=staging
43
OSRD_GIT_DESCRIBE=xxxxxx

front/.env.local.defaults

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
OSRD_BACKEND_URL=http://localhost:4000
21
OSRD_SENTRY_DSN=
32
OSRD_SENTRY_ENVIRONMENT=
43
OSRD_GIT_DESCRIBE=

front/src/config/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const MAIN_API = {
2-
proxy_editoast: `${import.meta.env.OSRD_BACKEND_URL}/api`,
3-
proxy_gateway: `${import.meta.env.OSRD_BACKEND_URL}`,
2+
proxy_editoast: '/api',
3+
proxy_gateway: '',
44
version: '0.0.1',
55
editor: {
66
component_identifier: { database: 'gaia', name: 'Test' },

front/src/vite-env.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// <reference types="vite/client" />
22

33
interface ImportMetaEnv {
4-
OSRD_BACKEND_URL: string;
54
OSRD_SENTRY_DSN: string;
65
OSRD_SENTRY_ENVIRONMENT: string;
76
OSRD_GIT_DESCRIBE: string;

0 commit comments

Comments
 (0)