mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 16:36:20 +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
|
||||
const dashboardUrl = process.env.DASHBOARD_URL;
|
||||
const dashboardUrl = config.getRawConfig().app.dashboard_url;
|
||||
if (dashboardUrl) {
|
||||
const dashboardHost = new URL(dashboardUrl).hostname;
|
||||
if (fullDomain === dashboardHost) {
|
||||
|
||||
@@ -354,7 +354,7 @@ async function updateHttpResource(
|
||||
}
|
||||
|
||||
// Prevent updating resource with same domain as dashboard
|
||||
const dashboardUrl = process.env.DASHBOARD_URL;
|
||||
const dashboardUrl = config.getRawConfig().app.dashboard_url;
|
||||
if (dashboardUrl) {
|
||||
const dashboardHost = new URL(dashboardUrl).hostname;
|
||||
if (fullDomain === dashboardHost) {
|
||||
|
||||
Reference in New Issue
Block a user