All the 4xx error should return error document. https://docs.aws.amazon.com/AmazonS3/latest/API/API_ErrorDocument.html
Now only in 404, yig returns error document and returns hard coded 404.
It's expected to handle and return proper 4xx error code.
To Reproduce
Check ReturnWebsiteErrorDocument().
There is no support for header x-amz-website-redirect-location.
All the 4xx error should return error document.
https://docs.aws.amazon.com/AmazonS3/latest/API/API_ErrorDocument.html
Now only in 404, yig returns error document and returns hard coded 404.
It's expected to handle and return proper 4xx error code. To Reproduce Check ReturnWebsiteErrorDocument().
There is no support for header x-amz-website-redirect-location.
In DoRedirect(), yig returns 302 StatusFound, while 301 StatusMovedPermanently is expected.
https://amazonaws-china.com/cn/premiumsupport/knowledge-center/redirect-domain-route-53/