Skip to content

Commit fbe0da7

Browse files
committed
fix: remove client host
1 parent 9c78169 commit fbe0da7

3 files changed

Lines changed: 7 additions & 12 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ env:
1919
APPS_PUBLISHER_ID: 9c9cea73-f3b7-48a3-aa6e-ead82c0685e7 # mock uuid
2020
GRAASPER_CREATOR_ID: bbbf7cac-6139-45e4-8fbf-4cf767b50b29 # mock uuid
2121
COOKIE_DOMAIN: localhost
22-
CLIENT_HOST: http://localhost:3114
2322
DB_PASSWORD: docker
2423
DB_USERNAME: docker
2524
DB_NAME: docker

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ GRAASPER_CREATOR_ID=<id>
201201
# REDIS_CONNECTION=
202202

203203
# Client hosts
204-
CLIENT_HOST=http://localhost:3114
205204
LIBRARY_CLIENT_HOST=http://localhost:3005
206205

207206
# Base url used to redirect shortlink aliases

src/utils/config.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,10 @@ export const BUILD_TIMESTAMP = process.env.BUILD_TIMESTAMP;
1919

2020
export const ADMIN_SHARED_SECRET = process.env.ADMIN_SHARED_SECRET;
2121

22-
export const CLIENT_HOST = process.env.CLIENT_HOST ?? 'http://localhost:3114';
23-
24-
export const LIBRARY_HOST = process.env.LIBRARY_CLIENT_HOST ?? CLIENT_HOST;
25-
2622
// Fallback to the server-provided integration is only available in dev
2723
export const H5P_INTEGRATION_URL =
2824
process.env.H5P_INTEGRATION_URL ?? 'http://localhost:3000/h5p-integration';
2925

30-
export const ALLOWED_ORIGINS = [new URL(CLIENT_HOST).origin, new URL(LIBRARY_HOST).origin];
31-
32-
// Add the hosts of the different clients
33-
ClientManager.getInstance().setHost(CLIENT_HOST).addHost(Context.Library, LIBRARY_HOST);
34-
3526
export const PROTOCOL = process.env.PROTOCOL || 'http';
3627
export const HOSTNAME = process.env.HOSTNAME || 'localhost';
3728
/**
@@ -77,7 +68,13 @@ export const CORS_ORIGIN_REGEX = process.env.CORS_ORIGIN_REGEX;
7768
* }
7869
* >
7970
*/
80-
export const PUBLIC_URL = new URL(process.env.CLIENT_HOST ?? HOST);
71+
export const PUBLIC_URL = new URL(HOST);
72+
export const LIBRARY_HOST = process.env.LIBRARY_CLIENT_HOST || HOST;
73+
74+
export const ALLOWED_ORIGINS = [new URL(HOST).origin, new URL(LIBRARY_HOST).origin];
75+
76+
// Add the hosts of the different clients
77+
ClientManager.getInstance().setHost(HOST).addHost(Context.Library, LIBRARY_HOST);
8178

8279
/**
8380
* GRAASP FILE STORAGE CONFIG

0 commit comments

Comments
 (0)