mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-02 12:33:52 +00:00
Revert "fix: Always use IP address for webhooks"
This reverts commit 880865f1f2.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
import { toast } from '@zerodevx/svelte-toast';
|
||||
|
||||
import { t } from '$lib/translations';
|
||||
import { getIP } from '$lib/components/common';
|
||||
const { id } = $page.params;
|
||||
let url = browser ? (settings.fqdn ? settings.fqdn : window.location.origin) : '';
|
||||
|
||||
@@ -27,8 +26,7 @@
|
||||
appSecret: null
|
||||
};
|
||||
}
|
||||
onMount(async () => {
|
||||
url = await getIP();
|
||||
onMount(() => {
|
||||
oauthIdEl && oauthIdEl.focus();
|
||||
});
|
||||
|
||||
|
||||
@@ -30,21 +30,21 @@
|
||||
|
||||
<script>
|
||||
import { dev } from '$app/env';
|
||||
import { getDomain, dashify, getIP } from '$lib/components/common';
|
||||
import { getDomain, dashify } from '$lib/components/common';
|
||||
import { t } from '$lib/translations';
|
||||
|
||||
export let source;
|
||||
export let settings;
|
||||
onMount(async () => {
|
||||
onMount(() => {
|
||||
const { organization, id, htmlUrl } = source;
|
||||
const { fqdn } = settings;
|
||||
const ip = await getIP();
|
||||
let host = `http://${ip}`;
|
||||
if (fqdn && fqdn.startsWith('https')) {
|
||||
host = `https://${ip}`;
|
||||
}
|
||||
console.log(ip, host);
|
||||
const host = dev
|
||||
? 'http://localhost:3000'
|
||||
: fqdn
|
||||
? fqdn
|
||||
: `http://${window.location.host}` || '';
|
||||
const domain = getDomain(fqdn);
|
||||
|
||||
let url = 'settings/apps/new';
|
||||
if (organization) url = `organizations/${organization}/settings/apps/new`;
|
||||
const name = dashify(domain) || 'app';
|
||||
|
||||
Reference in New Issue
Block a user