mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-09 20:35:28 +02:00
allow 80 or 443 raw resources
This commit is contained in:
parent
bc0b467f1a
commit
b6963a9c35
2 changed files with 22 additions and 22 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue