MartijnVisser commented on code in PR #28601:
URL: https://github.com/apache/flink/pull/28601#discussion_r3531086934
##########
flink-runtime-web/web-dashboard/proxy.conf.json:
##########
@@ -1,6 +1,6 @@
[
{
- "context": ["/"],
+ "context": ["/applications", "/config", "/jars", "/jobmanager", "/jobs",
"/overview", "/taskmanagers"],
Review Comment:
This variant still doesn't work, just differently. The app itself now loads
(progress over "/"), but the default Overview route immediately fails with a
404 on `overview.component-<hash>.js` and `ERROR TypeError: Failed to fetch
dynamically imported module`.
AI tells me that Vite matches plain proxy keys as path prefixes against
every request, and the esbuild dev server serves lazy route chunks at the root.
So `/overview` also captures the `overview.component-<hash>.js` chunk and
proxies it to the JobManager, which doesn't have it. A prefix list cannot
distinguish the REST endpoint from the chunk file.
What does work (verified locally against a running cluster, including the
flame graph): a single regex key, which Angular's proxy-config normalization
passes through to Vite as a RegExp:
```
{
"^/(applications|config|jars|jobmanager|jobs|overview|taskmanagers)(/|\\?|$)": {
"target": "http://localhost:8081",
"secure": false
}
}
```
The (/|\?|$) boundary matches the exact endpoints and their subpaths while
keeping chunk files out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]