By yarikyarik
Is there a way to change error code for response. For example if there is no file i would like to get 303 instead of 403?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
There is no way to change the error codes that you receive.
Also 403 is a forbidden error code, while 303 is used more of a redirect to a new URI, most commonly associated with the completion of a POST request, so it is breaking standard protocol.
However, if you really felt compelled to redirect error codes you can setup a proxy such as nginx to route requests for you. So that instead of hitting Spaces directly, you would hit nginx, which would then route your request to Spaces and if it got a 403 then you can instead issue a 303.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.