allow 80 or 443 raw resources

This commit is contained in:
Milo Schwartz 2025-02-04 21:39:13 -05:00
parent bc0b467f1a
commit b6963a9c35
No known key found for this signature in database
2 changed files with 22 additions and 22 deletions

View file

@ -79,17 +79,17 @@ const createResourceSchema = z
message: "Proxy port cannot be set"
}
)
.refine(
(data) => {
if (data.proxyPort === 443 || data.proxyPort === 80) {
return false;
}
return true;
},
{
message: "Port 80 and 443 are reserved for http and https resources"
}
)
// .refine(
// (data) => {
// if (data.proxyPort === 443 || data.proxyPort === 80) {
// return false;
// }
// return true;
// },
// {
// message: "Port 80 and 443 are reserved for http and https resources"
// }
// )
.refine(
(data) => {
if (!config.getRawConfig().flags?.allow_base_domain_resources) {

View file

@ -46,17 +46,17 @@ const updateResourceBodySchema = z
},
{ message: "Cannot update proxyPort" }
)
.refine(
(data) => {
if (data.proxyPort === 443 || data.proxyPort === 80) {
return false;
}
return true;
},
{
message: "Port 80 and 443 are reserved for http and https resources"
}
)
// .refine(
// (data) => {
// if (data.proxyPort === 443 || data.proxyPort === 80) {
// return false;
// }
// return true;
// },
// {
// message: "Port 80 and 443 are reserved for http and https resources"
// }
// )
.refine(
(data) => {
if (!config.getRawConfig().flags?.allow_base_domain_resources) {