mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 20:26:40 +00:00
fix: use config instead of process.env for dashboard URL check
This commit is contained in:
@@ -224,7 +224,7 @@ async function createHttpResource(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent creating resource with same domain as dashboard
|
// Prevent creating resource with same domain as dashboard
|
||||||
const dashboardUrl = process.env.DASHBOARD_URL;
|
const dashboardUrl = config.getRawConfig().app.dashboard_url;
|
||||||
if (dashboardUrl) {
|
if (dashboardUrl) {
|
||||||
const dashboardHost = new URL(dashboardUrl).hostname;
|
const dashboardHost = new URL(dashboardUrl).hostname;
|
||||||
if (fullDomain === dashboardHost) {
|
if (fullDomain === dashboardHost) {
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ async function updateHttpResource(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent updating resource with same domain as dashboard
|
// Prevent updating resource with same domain as dashboard
|
||||||
const dashboardUrl = process.env.DASHBOARD_URL;
|
const dashboardUrl = config.getRawConfig().app.dashboard_url;
|
||||||
if (dashboardUrl) {
|
if (dashboardUrl) {
|
||||||
const dashboardHost = new URL(dashboardUrl).hostname;
|
const dashboardHost = new URL(dashboardUrl).hostname;
|
||||||
if (fullDomain === dashboardHost) {
|
if (fullDomain === dashboardHost) {
|
||||||
|
|||||||
Reference in New Issue
Block a user