mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-25 14:26:39 +00:00
Merge dev into fix/log-analytics-adjustments
This commit is contained in:
@@ -45,8 +45,8 @@ registry.registerPath({
|
||||
});
|
||||
|
||||
const pickSiteDefaultsSchema = z.strictObject({
|
||||
orgId: z.string()
|
||||
});
|
||||
orgId: z.string()
|
||||
});
|
||||
|
||||
export async function pickSiteDefaults(
|
||||
req: Request,
|
||||
@@ -74,7 +74,10 @@ export async function pickSiteDefaults(
|
||||
|
||||
if (!randomExitNode) {
|
||||
return next(
|
||||
createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "No available exit node")
|
||||
createHttpError(
|
||||
HttpCode.INTERNAL_SERVER_ERROR,
|
||||
"No available exit node"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -90,7 +93,10 @@ export async function pickSiteDefaults(
|
||||
// TODO: we need to lock this subnet for some time so someone else does not take it
|
||||
const subnets = sitesQuery
|
||||
.map((site) => site.subnet)
|
||||
.filter((subnet) => subnet && /^(\d{1,3}\.){3}\d{1,3}\/\d{1,2}$/.test(subnet))
|
||||
.filter(
|
||||
(subnet) =>
|
||||
subnet && /^(\d{1,3}\.){3}\d{1,3}\/\d{1,2}$/.test(subnet)
|
||||
)
|
||||
.filter((subnet) => subnet !== null);
|
||||
// exclude the exit node address by replacing after the / with a site block size
|
||||
subnets.push(
|
||||
|
||||
Reference in New Issue
Block a user