mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-06 02:36:38 +00:00
allow 80 or 443 raw resources
This commit is contained in:
@@ -79,17 +79,17 @@ const createResourceSchema = z
|
|||||||
message: "Proxy port cannot be set"
|
message: "Proxy port cannot be set"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.refine(
|
// .refine(
|
||||||
(data) => {
|
// (data) => {
|
||||||
if (data.proxyPort === 443 || data.proxyPort === 80) {
|
// if (data.proxyPort === 443 || data.proxyPort === 80) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
message: "Port 80 and 443 are reserved for http and https resources"
|
// message: "Port 80 and 443 are reserved for http and https resources"
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
.refine(
|
.refine(
|
||||||
(data) => {
|
(data) => {
|
||||||
if (!config.getRawConfig().flags?.allow_base_domain_resources) {
|
if (!config.getRawConfig().flags?.allow_base_domain_resources) {
|
||||||
|
|||||||
@@ -46,17 +46,17 @@ const updateResourceBodySchema = z
|
|||||||
},
|
},
|
||||||
{ message: "Cannot update proxyPort" }
|
{ message: "Cannot update proxyPort" }
|
||||||
)
|
)
|
||||||
.refine(
|
// .refine(
|
||||||
(data) => {
|
// (data) => {
|
||||||
if (data.proxyPort === 443 || data.proxyPort === 80) {
|
// if (data.proxyPort === 443 || data.proxyPort === 80) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
message: "Port 80 and 443 are reserved for http and https resources"
|
// message: "Port 80 and 443 are reserved for http and https resources"
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
.refine(
|
.refine(
|
||||||
(data) => {
|
(data) => {
|
||||||
if (!config.getRawConfig().flags?.allow_base_domain_resources) {
|
if (!config.getRawConfig().flags?.allow_base_domain_resources) {
|
||||||
|
|||||||
Reference in New Issue
Block a user