Home S3 - Redirect to a static website using a POST request
Reply: 0

S3 - Redirect to a static website using a POST request

user1415
1#
user1415 Published in June 18, 2018, 7:32 am

I am hosting a static website on S3 and this is my form that redirects to this website. I don't need to get any of the submitted parameters, just a simple redirect.

        <form action="http://website.com" method="POST"  >
          // my code
        </form>  

After submitting the form, I am redirected to the static website but I had this error:

405 Method Not Allowed
Code: MethodNotAllowed
Message: The specified method is not allowed against this resource.
Method: POST
ResourceType: OBJECT
RequestId: 1EEFE221F692910D
HostId: obKOVc3LTyhc4NUdrs+S7DXOOv6FZYmdWEXOgCo3UVdb6beiI/aP8bQxihaMUenYTJyE+thrCaQ=

My S3 bucket CORS configuration is the following:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>    
    <MaxAgeSeconds>3000</MaxAgeSeconds>
</CORSRule>
</CORSConfiguration>

While it seems that my CORS configuration are right, I don't still find from where comes the error message (405 Method Not Allowed).

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320979 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO