Re: CORS not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 3, 2013 at 3:40 AM, Pawel Stefanski <pejotes@xxxxxxxxx> wrote:
> hello!
>
> I've tried with wip-6078 and git dumpling builds and got the same error
> during OPTIONS request.
>
> curl -v -X OPTIONS -H 'Access-Control-Request-Method: PUT' -H "Origin:
> http://XXXXX.pl"; http://static3.XXXXX.pl/
>
>> OPTIONS / HTTP/1.1
>> User-Agent: curl/7.31.0
>> Host: static3.XXXXX.pl
>> Accept: */*
>> Access-Control-Request-Method: PUT
>> Origin: http://XXXXX.pl
>>
> < HTTP/1.1 403 Forbidden
> < Date: Tue, 03 Sep 2013 09:34:39 GMT
> * Server Apache/2.2.22 (Ubuntu) is not blacklisted
> < Server: Apache/2.2.22 (Ubuntu)
> < Accept-Ranges: bytes
> < Content-Length: 78
> < Content-Type: application/xml
> <
> <?xml version="1.0"
> encoding="UTF-8"?><Error><Code>AccessDenied</Code></Error>
>
> Of course CORS was set, but RGW can't find it, dump from log:
>
> 2013-09-03 11:34:39.876809 7f7c6dff3700  2 req 129:0.000385:s3:OPTIONS
> /:options_cors:verifying op mask
> 2013-09-03 11:34:39.876813 7f7c6dff3700 20 required_mask= 1 user.op_mask=7
> 2013-09-03 11:34:39.876815 7f7c6dff3700  2 req 129:0.000392:s3:OPTIONS
> /:options_cors:verifying op permissions
> 2013-09-03 11:34:39.876818 7f7c6dff3700  2 req 129:0.000395:s3:OPTIONS
> /:options_cors:verifying op params
> 2013-09-03 11:34:39.876821 7f7c6dff3700  2 req 129:0.000397:s3:OPTIONS
> /:options_cors:executing
> 2013-09-03 11:34:39.876824 7f7c6dff3700  2 No CORS configuration set yet for
> this bucket
> 2013-09-03 11:34:39.876907 7f7c6dff3700  2 req 129:0.000483:s3:OPTIONS
> /:options_cors:http status=403
> 2013-09-03 11:34:39.877551 7f7c6dff3700  1 ====== req done req=0x128e0e0
> http_status=403 ======
>
> Setting CORSfor static3 bucket:
>
> CORSConfiguration<CORSConfiguration><CORSRule><AllowedMethod>GET</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMetho
> d>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedOrigin>http://static3.XXXXX.pl</AllowedOrigin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</
> MaxAgeSeconds></CORSRule><CORSRule><AllowedMethod>GET</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMe
> thod><AllowedOrigin>http://static3.XXXXX.pl/</AllowedOrigin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds></CORSRule><CORSRule><AllowedMethod>GET
> </AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedOrigin>http://XXXXX.pl/</AllowedOri
> gin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds></CORSRule></CORSConfiguration>
> 2013-09-03 12:34:02.973999 7f7c44fa1700 20 get_obj_state:
> rctx=0x7f7c38009330 obj=.rgw:static3 state=0x7f7c38008768 s->prefetch_data=0
> 2013-09-03 12:34:02.974004 7f7c44fa1700 20 state->obj_tag is empty, not
> appending atomic test
> 2013-09-03 12:34:02.983719 7f7c44fa1700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.983750 7f7c44fa1700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.983756 7f7c44fa1700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.983801 7f7c44fa1700 10 distributing notification
> oid=notify.2 bl.length()=389
> 2013-09-03 12:34:02.986649 7f7c9bfff700 10 RGWWatcher::notify() opcode=1
> ver=1 bl.length()=389
> 2013-09-03 12:34:02.986696 7f7c9bfff700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.986699 7f7c9bfff700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.986703 7f7c9bfff700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.987861 7f7c44fa1700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.987872 7f7c44fa1700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.987876 7f7c44fa1700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.987901 7f7c44fa1700 10 distributing notification
> oid=notify.2 bl.length()=389
> 2013-09-03 12:34:02.988593 7f7c9bfff700 10 RGWWatcher::notify() opcode=1
> ver=1 bl.length()=389
> 2013-09-03 12:34:02.988624 7f7c9bfff700 10 cache put: name=.rgw+static3
> 2013-09-03 12:34:02.988627 7f7c9bfff700 10 moving .rgw+static3 to cache LRU
> end
> 2013-09-03 12:34:02.988635 7f7c9bfff700 10 appending xattr:
> name=user.rgw.cors bl.length()=194
> 2013-09-03 12:34:02.989550 7f7c44fa1700  2 req 133:0.016683:s3:PUT
> /:put_cors:http status=200
>
> Checked with:
> 0.67.1-8-gaeb4141 (aeb414135326805324d619b507274b1d0cef7067)
> 0.67.2-22-ga708c8a (a708c8ab52e5b1476405a1f817c23b8845fbaab3)
>


Did you configure the virtual bucket name through host name correctly?
For that you would have needed to set 'rgw dns name' in your
ceph.conf. It seems as if it's not set and you're using it.

Yehuda
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux