fix: sso and livekit networking
This commit is contained in:
parent
19064d4357
commit
a02b6edd92
@ -111,14 +111,10 @@ services:
|
|||||||
container_name: livekit
|
container_name: livekit
|
||||||
profiles: ['voice']
|
profiles: ['voice']
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
command: ['--config', '/etc/livekit/livekit.yaml']
|
command: ['--config', '/etc/livekit/livekit.yaml']
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/livekit.yaml:/etc/livekit/livekit.yaml:ro
|
- ./config/livekit.yaml:/etc/livekit/livekit.yaml:ro
|
||||||
ports:
|
|
||||||
- '${LIVEKIT_PORT:-7880}:7880'
|
|
||||||
- '7881:7881'
|
|
||||||
- '3478:3478/udp'
|
|
||||||
- '50000-50100:50000-50100/udp'
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'wget -qO- http://127.0.0.1:7880 || exit 1']
|
test: ['CMD-SHELL', 'wget -qO- http://127.0.0.1:7880 || exit 1']
|
||||||
interval: 15s
|
interval: 15s
|
||||||
|
|||||||
@ -454,8 +454,7 @@ export class SsoService {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (config.clientSecret) {
|
if (config.clientSecret) {
|
||||||
const encoded = Buffer.from(`${config.clientId}:${config.clientSecret}`, 'utf8').toString('base64');
|
body.set('client_secret', config.clientSecret);
|
||||||
headers['Authorization'] = `Basic ${encoded}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const resp = await FetchUtils.sendRequest({
|
const resp = await FetchUtils.sendRequest({
|
||||||
@ -520,7 +519,7 @@ export class SsoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async getResolvedConfig(): Promise<ResolvedSsoConfig> {
|
private async getResolvedConfig(): Promise<ResolvedSsoConfig> {
|
||||||
const stored = await this.instanceConfigRepository.getSsoConfig();
|
const stored = await this.instanceConfigRepository.getSsoConfig({ includeSecret: true });
|
||||||
const redirectUri = stored.redirectUri ?? `${Config.endpoints.webApp}/auth/sso/callback`;
|
const redirectUri = stored.redirectUri ?? `${Config.endpoints.webApp}/auth/sso/callback`;
|
||||||
const scope = stored.scope?.trim() || 'openid email profile';
|
const scope = stored.scope?.trim() || 'openid email profile';
|
||||||
const providerId = stored.issuer || stored.authorizationUrl || 'sso';
|
const providerId = stored.issuer || stored.authorizationUrl || 'sso';
|
||||||
|
|||||||
@ -100,6 +100,9 @@ export function resolveRequestBody(body: unknown, headers: Record<string, string
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (body instanceof URLSearchParams) {
|
||||||
|
return body.toString();
|
||||||
|
}
|
||||||
if (typeof body === 'string') {
|
if (typeof body === 'string') {
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user