Missing Allow Origin Headers #609

Closed
opened 2023-08-06 16:37:38 +00:00 by RndUsername · 3 comments

Hi,
I posted my problem already on #258 and will reapeat it here in hope to get an answer faster:
I get a 'CORS Missing Allow Origin' error on my POST requests but paradoxically not for my OPTIONS requests, so:
OPTIONS
POST 'CORS Missing Allow Origin'

My CORS rules set via AWS CLI are:

> aws s3api get-bucket-cors --bucket home-dms-bucket
{
    "CORSRules": [
        {
            "AllowedHeaders": [
                "*"
            ],
            "AllowedMethods": [
                "POST"
            ],
            "AllowedOrigins": [
                "*"
            ],
            "MaxAgeSeconds": 3000
        }
    ]
}

And the response I get for the pre-flight OPTIONS is:

HTTP/1.1 200 OK
access-control-allow-origin: *
access-control-allow-methods: POST
access-control-allow-headers: *
access-control-expose-headers: 
content-length: 0
date: Mon, 31 Jul 2023 11:24:58 GMT

But for the POST request which gets called right after that, is:

HTTP/1.1 204 No Content
location: https://localhost:3900/home-dms-bucketclkqs9rq300038jj0ksji37iw
etag: "be91b057ab2b3e393e822ef0453eddc4"
date: Mon, 31 Jul 2023 11:24:58 GMT

Am I missing somthing? Does this happen to anyone else? I would really appreciate any help.

Hi, I posted my problem already on #258 and will reapeat it here in hope to get an answer faster: I get a 'CORS Missing Allow Origin' error on my POST requests but paradoxically not for my OPTIONS requests, so: OPTIONS ✅ POST ❌ 'CORS Missing Allow Origin' My CORS rules set via AWS CLI are: ``` > aws s3api get-bucket-cors --bucket home-dms-bucket { "CORSRules": [ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "POST" ], "AllowedOrigins": [ "*" ], "MaxAgeSeconds": 3000 } ] } ``` And the response I get for the pre-flight OPTIONS is: ``` HTTP/1.1 200 OK access-control-allow-origin: * access-control-allow-methods: POST access-control-allow-headers: * access-control-expose-headers: content-length: 0 date: Mon, 31 Jul 2023 11:24:58 GMT ``` But for the POST request which gets called right after that, is: ``` HTTP/1.1 204 No Content location: https://localhost:3900/home-dms-bucketclkqs9rq300038jj0ksji37iw etag: "be91b057ab2b3e393e822ef0453eddc4" date: Mon, 31 Jul 2023 11:24:58 GMT ``` Am I missing somthing? Does this happen to anyone else? I would really appreciate any help.
Author

Soo... the images are actually getting uploaded fine but the browser still says its missing an allow origin header. So I can actually use garage as normal but I will get annoying error messages.

Soo... the images are actually getting uploaded fine but the browser still says its missing an allow origin header. So I can actually use garage as normal but I will get annoying error messages.
lx added the
Bug
label 2023-10-16 09:39:21 +00:00
lx added this to the v1.0 milestone 2023-10-16 09:39:24 +00:00

Having the same issue using a presigned post URL. The response from garage is missing CORS headers

By the way thank you for the great product. Offering a great alternative.

Having the same issue using a presigned post URL. The response from garage is missing CORS headers By the way thank you for the great product. Offering a great alternative.
Owner

Could you check that the issue is solved with the following builds?

Garage 0.8.x -> build ac04934daefe48ac4f41d22b9129d1fe2ce44833

Garage 0.9.x -> build 79eeb4f8d6bbe40274b48ff9c7c1bcc13dbdb714

Those builds can be found on the downloads page in the "development builds" section.

Could you check that the issue is solved with the following builds? Garage 0.8.x -> build `ac04934daefe48ac4f41d22b9129d1fe2ce44833` Garage 0.9.x -> build `79eeb4f8d6bbe40274b48ff9c7c1bcc13dbdb714` Those builds can be found on the downloads page in the "development builds" section.
lx closed this issue 2023-10-26 09:17:15 +00:00
lx referenced this issue from a commit 2024-01-16 11:13:07 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#609
No description provided.