backend: change the default backend plugin mount point to /api

This commit is contained in:
Patrik Oldsberg
2020-09-22 14:56:52 +02:00
parent 2e043e11d9
commit 521728348d
22 changed files with 68 additions and 60 deletions
+3 -1
View File
@@ -28,6 +28,7 @@ export interface RouterOptions {
logger: Logger;
database: Knex;
config: Config;
basePath?: string;
}
export async function createRouter(
@@ -38,7 +39,8 @@ export async function createRouter(
const appUrl = options.config.getString('app.baseUrl');
const backendUrl = options.config.getString('backend.baseUrl');
const authUrl = `${backendUrl}/auth`;
// TODO(Rugvip): Replace with service discovery of external URL
const authUrl = backendUrl + (options.basePath ?? '/api/auth');
const keyDurationSeconds = 3600;