mardi 30 juin 2015

Error 405 when connecting a Facebook page hosted at Amazon S3

I would like to load a single image on a Facebook Custon Tab. The content is available online on this link: http://ift.tt/1Kpy7ZL

I hosted the files via Amazon S3. Configured Route 53 to handle my DNS. And activated CloudFront to serve HTTPS to the targeted bucket.

I also changed the CORS S3 config to be like this:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://ift.tt/1f8lKAh">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <ExposeHeader>ETag</ExposeHeader>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

After all that I still get the 405 when accessing via Facebook.

This is the verbose output when accessing the page via SSL.

curl -I -v -ssl http://ift.tt/1Kpy7ZL
* Hostname was NOT found in DNS cache
*   Trying 54.230.194.31...
* Connected to d3p61garc8eqm1.cloudfront.net (54.230.194.31) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
* Server certificate: *.cloudfront.net
* Server certificate: VeriSign Class 3 Secure Server CA - G3
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> HEAD /facebook.html HTTP/1.1
> User-Agent: curl/7.37.1
> Host: d3p61garc8eqm1.cloudfront.net
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 428
Content-Length: 428
< Connection: keep-alive
Connection: keep-alive
< Date: Wed, 01 Jul 2015 01:44:29 GMT
Date: Wed, 01 Jul 2015 01:44:29 GMT
< Last-Modified: Wed, 01 Jul 2015 01:44:06 GMT
Last-Modified: Wed, 01 Jul 2015 01:44:06 GMT
< ETag: "89fc2a26c87fbc6d16e6cb91a86853b9"
ETag: "89fc2a26c87fbc6d16e6cb91a86853b9"
* Server AmazonS3 is not blacklisted
< Server: AmazonS3
Server: AmazonS3
< Age: 3455
Age: 3455
< X-Cache: Hit from cloudfront
X-Cache: Hit from cloudfront
< Via: 1.1 4ee6cbd5f14ab44f81cd41b0f1148c25.cloudfront.net (CloudFront)
Via: 1.1 4ee6cbd5f14ab44f81cd41b0f1148c25.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: 4C5RXGqHqaURXGk1KuYBRS28QxKTZ60RnS4Na72iX8jiGhv85HxqLw==
X-Amz-Cf-Id: 4C5RXGqHqaURXGk1KuYBRS28QxKTZ60RnS4Na72iX8jiGhv85HxqLw==

<
* Connection #0 to host d3p61garc8eqm1.cloudfront.net left intact

I would love some help on this. Trying everything I found online e nothing worked.




Aucun commentaire:

Enregistrer un commentaire