mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-14 06:13:33 +01:00
Option to disable real-time SSE-based loading page (per container maybe) #124
Reference in New Issue
Block a user
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?
Originally created by @crgmz on GitHub (Dec 17, 2025).
Hello, is there a way to disable the loading page that shows while a container is waking up? I have some apps hitting my container that error out when they receive html (the loading page) because they expected json. An option to not respond to the request until the container is ready would be great as the container I'm running only takes a few seconds to wake up
@yusing commented on GitHub (Dec 17, 2025):
GoDoxy does not send HTML loading page but instead a plain "Container woken" response for non HTML-requests.
I've just added back an old logic which wait and redirect until the container is ready (
b7250b29e0).If it still does not work, I've also added an option to disable loading page per container (
86a46d191d).Please either try it on
nightlytag or wait for the next patch v0.21.1.@crgmz commented on GitHub (Dec 17, 2025):
Thank you so much for the quick response, I appreciate it. I just tested the nightly image and have one tiny question: I see you chose
http.StatusSeeOther(303) for the redirect which tells the client to handle the redirect withGET(as per mdn), that unfortunately breaks endpoints that didn't expect or explicitly disallowGET(as I found out from testing just now). Any reason to go with 303 instead of 307?@yusing commented on GitHub (Dec 17, 2025):
You're right, 307 should be used. Just curious what is use case of sending a POST/PUT request to a sleeping service?
Edit: the redirection is unnecessary, changed to serve the request directly instead
@crgmz commented on GitHub (Dec 17, 2025):
in my case the
POSTcontains a payload that describes some jobs for the service to execute@yusing commented on GitHub (Dec 17, 2025):
I see. Please update the nightly iamge and try again
@crgmz commented on GitHub (Dec 17, 2025):
I just tested the new nightly and I think the redirect is needed, without it the first request to a sleeping service (
GET,POST, anything) returns 502 while the service wakes up.@yusing commented on GitHub (Dec 17, 2025):
I don't think adding redirect will help. The cause is health checker does not treat 5xx (execept 503) as "unhealthy" as stated in https://docs.godoxy.dev/Health-monitoring#http-healthcheck.
We should add 502 and 504, or even all 5xx code. What do you think?
@crgmz commented on GitHub (Dec 17, 2025):
The redirect provided a nice (and maybe unintended) built-in retry as the client simply followed the redirect until the service was ready (a few seconds in my case), without it I'm stuck with 3rd-party clients that don't have any custom retry logic and stop dead in their tracks as soon as the 502 comes in (and an error page when loading the website of a sleeping service). I'm starting to feel like I'm the spacebar heating guy, but the redirect with a 307 would be nice for my usecase, I would even settle for the original 303 as that allowed
GETrequests to work nicely in the browser@yusing commented on GitHub (Dec 17, 2025):
I see your point. Adding 5xx code to health check logic will cause the
waitReadymethod it wait until it sees non-5xx, and then proceed to the upstream. So you won't see 5xx on the client side. Talking is cheap, let me do the commit and you can test it with another update.@yusing commented on GitHub (Dec 17, 2025):
Updated, try again?
@crgmz commented on GitHub (Dec 17, 2025):
yup, that did it, thank you very much
@yusing commented on GitHub (Dec 17, 2025):
Great. That should be it. Will release together with another bug fix.
@yusing commented on GitHub (Dec 17, 2025):
Closing it now as fixed in 0.21.1