Cloud Run and Resources not loading via the LoadBalancer routing #84137
Unanswered
TalalBhatti
asked this question in
Help
Replies: 1 comment
-
The problem usually comes up because Next.js tries to serve static files relative to the domain it’s running on. When you put it behind a load balancer, those requests can get pointed at the LB domain instead of the Cloud Run service. A couple things you can try:
Easiest way to confirm is open the Network tab and see which files are 404’ing. That will usually show you if it’s just a prefix mismatch. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Everything works on Cloud Run, but behind the load balancer the app fails with partial asset loading. Network traces show static resources being fetched from the load balancer domain instead of the Cloud Run service URL.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions