mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-06 20:29:50 +00:00
Remove the path rewrite from the next route
This commit is contained in:
@@ -1294,16 +1294,14 @@ export async function getTraefikConfig(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Assets router at higher priority so /_next files load without rewrite
|
// Assets router at higher priority so /_next files load without rewrite.
|
||||||
|
// Do NOT apply the path-rewrite middleware here — static assets must
|
||||||
|
// keep their original path; only the host headers are needed.
|
||||||
config_output.http.routers![
|
config_output.http.routers![
|
||||||
`bg-r${bgResource.resourceId}-assets-router`
|
`bg-r${bgResource.resourceId}-assets-router`
|
||||||
] = {
|
] = {
|
||||||
entryPoints: [entrypoint],
|
entryPoints: [entrypoint],
|
||||||
middlewares: [
|
middlewares: [...routerMiddlewares, uiHeadersMiddlewareName],
|
||||||
...routerMiddlewares,
|
|
||||||
uiRewriteMiddlewareName,
|
|
||||||
uiHeadersMiddlewareName
|
|
||||||
],
|
|
||||||
service: bgUiServiceName,
|
service: bgUiServiceName,
|
||||||
rule: `${hostRule} && (PathPrefix(\`/_next\`) || PathRegexp(\`^/__nextjs*\`) || Path(\`/favicon.ico\`))`,
|
rule: `${hostRule} && (PathPrefix(\`/_next\`) || PathRegexp(\`^/__nextjs*\`) || Path(\`/favicon.ico\`))`,
|
||||||
priority: 101,
|
priority: 101,
|
||||||
|
|||||||
Reference in New Issue
Block a user