mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
fix(core): Update frontend urls when using the --tunnel
option (#6898)
fix(core): update frontend urls when using the `--tunnel` option
This commit is contained in:
parent
d71af4059b
commit
718e61354d
|
@ -404,6 +404,15 @@ export class Server extends AbstractServer {
|
|||
* Returns the current settings for the frontend
|
||||
*/
|
||||
getSettingsForFrontend(): IN8nUISettings {
|
||||
// Update all urls, in case `WEBHOOK_URL` was updated by `--tunnel`
|
||||
const instanceBaseUrl = getInstanceBaseUrl();
|
||||
this.frontendSettings.urlBaseWebhook = WebhookHelpers.getWebhookBaseUrl();
|
||||
this.frontendSettings.urlBaseEditor = instanceBaseUrl;
|
||||
this.frontendSettings.oauthCallbackUrls = {
|
||||
oauth1: `${instanceBaseUrl}/${this.restEndpoint}/oauth1-credential/callback`,
|
||||
oauth2: `${instanceBaseUrl}/${this.restEndpoint}/oauth2-credential/callback`,
|
||||
};
|
||||
|
||||
// refresh user management status
|
||||
Object.assign(this.frontendSettings.userManagement, {
|
||||
quota: Container.get(License).getUsersLimit(),
|
||||
|
|
Loading…
Reference in a new issue