It brought my site down:While Clouldflare's web proxy stuff is unaffected
That depends on the interpretation of what service is unavailable. If no service would be available then there would be no admin panel to upgrade. So obviously there is a service available. Just not the normal forum content. A no permission page does not give a 503 either. I don't think a 503 code is a logical decision.It’s the appropriate response code because it means “Service unavailable”.
A no permission page doesn't give a 503, because that would be an inappropriate response code. No permission gives a 403 "Forbidden" or 401 "Unauthorized" response. It's a bit of a strawman argument.That depends on the interpretation of what service is unavailable. If no service would be available then there would be no admin panel to upgrade. So obviously there is a service available. Just not the normal forum content. A no permission page does not give a 503 either. I don't think a 503 code is a logical decision.
src/config.php
to something more compatible with whichever systems you have in place.$config['serviceUnavailableCode'] = 200;
Would that work for everyone?
Sounds like a planThat said, we're open to compromise. The only workable way I can see to compromise right now is to make the "service unavailable" response code to be configurable. We still default it to 503, but you could override it insrc/config.php
to something more compatible with whichever systems you have in place.
PHP:$config['serviceUnavailableCode'] = 200;
Would that work for everyone?
Yes, most definitely. Thanks!That said, we're open to compromise. The only workable way I can see to compromise right now is to make the "service unavailable" response code to be configurable. We still default it to 503, but you could override it insrc/config.php
to something more compatible with whichever systems you have in place.
PHP:$config['serviceUnavailableCode'] = 200;
Would that work for everyone?
That would be awesome.PHP:$config['serviceUnavailableCode'] = 200;
Would that work for everyone?
Any changes made as a result of this issue being resolved may not be rolled out here until later.Add a new config key serviceUnavailableCode (defaults to 503) which represents the response code returned when parts of the site are unavailable.
Would have saved me some time if this was listed within https://xenforo.com/docs/xf2/config/PHP:$config['serviceUnavailableCode'] = 200;
It's missing a decent amount, unfortunately. It's worth going through the config options in the code itself to see what's actually available for your version, although some config options are vestigial and may break the site, so test them first before putting them live.Would have saved me some time if this was listed within https://xenforo.com/docs/xf2/config/
The Docs page says "The following is a list of all settings that can be controlled through config.php.", but it's not all settings
Is there a definitive list of all?
And a Retry-After header should also be sent too. Unfortunately, XF doesn't do that. I've added a suggestion for it.503 is the correct response code when your board is closed.
We use essential cookies to make this site work, and optional cookies to enhance your experience.