Welcome! Log In Create A New Profile

Advanced

OPTIONS request failing when issued from CDN

June 30, 2018 02:54PM
I could make it easily from localhost:

curl -i -X OPTIONS http://www.server.com/css/reset.css ->

xxx.xxx.xxx.190 - - [30/Jun/2018:11:33:53 -0700] "OPTIONS /css/reset.css HTTP/1.1" 200 0 "-" "curl/7.38.0"
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 30 Jun 2018 18:47:49 GMT
Content-Type: text/css
Content-Length: 0
Connection: keep-alive
Expect-CT: enforce; max-age=3600
Strict-Transport-Security: max-age=0

However when the CDN does it, it fails with 405. I'd like to return a 200. Prefer not restricting the CDN on css/js/images at all.

I already have this in my config:

if ($request_method = OPTIONS ) { return 200; }

However the results are not what I expect:

```
185.180.15.73 - - [30/Jun/2018:11:27:31 -0700] "OPTIONS /css/reset.css HTTP/1.1" 405 568 "http://www.server.com/goonet.php?tsp=https://www.goo-net.com/cgi-bin/fsearch/goo_used_search.cgi%3Fcategory%3DUSD%26phrase%3D%25E3%2583%2580%25E3%2583%25B3%25E3%2583%2597%26query%3D%25E3%2583%2580%25E3%2583%25B3%25E3%2583%2597%26page%3D20#" "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko; googleweblight) Chrome/38.0.1025.166 Mobile Safari/535.19"
```

I tried the `return 200` only today. Prior to that, every solution proposed in the internet resulted in all the css being unavailable. No exception.
Subject Author Posted

OPTIONS request failing when issued from CDN

shiz June 30, 2018 02:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready