Web frontend has hardcoded rewrite url #8
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The web frontend is setup to proxy requests to localhost:8082 which is then baked into the build making it impossible to deploy this in Kubernetes as separate pods.
Requesting either:
I hobbled together #9 with my 3 active web dev brain cells
Wrote #10 with the best of my ability
I wrote a prototype middleware that accepts an environment variable of
API_HOST
using nextjsNew code is deployed at: https://maps.staging.strafes.net
Looks like the request to https://maps.staging.strafes.net/api/submissions?Page=1&Limit=100 is a 404 however.
Thanks for making this project possible
Why would it be 404, is there something wrong with the path? Middleware?
I guess to be clear, the middleware change is non-functional and I posted the URL so that @interpreterK can see.
I mistakenly put the middleware script in the wrong directory, it shall work now?
Is
59e5e529c6
resulting in two forward slashes? I looked at the request in firefox and it had this on it:x-middleware-rewrite http://maptest-api:8080/v1//submissions?Page=1&Limit=100
Not quite, I pushed an update to trim the /api prefix and now we're all set. Thanks!
@Quaternions nope the docs for API_HOST called for a trailing slash which was not appropriate. The code is fine.