Same Http requests, different responses [duplicate]

I am running the following CURL

curl -IX OPTIONS "http://example.com/api/resource?p=1&itemPerPage=2&order[date]=asc"

The curl from my computer receive the following response.

HTTP/1.1 200 OK
Date: Thu, 19 Nov 2020 15:21:39 GMT
Server: Apache/2.4.38 (Debian)
X-Powered-By: PHP/7.4.11
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, OPTIONS, POST
Content-Length: 0
Content-Type: text/html; charset=UTF-8

Same request did from browser:

General:

Request URL: http://example.com/api/resource?p=1&itemPerPage=2&order[date]=asc
Request Method: OPTIONS
Status Code: 200 OK
Remote Address: 20.71.65.186:80
Referrer Policy: strict-origin-when-cross-origin

Response Headers:

Access-Control-Allow-Headers: content-type, authorization
Access-Control-Allow-Methods: GET, OPTIONS, POST, PUT, PATCH, DELETE
Access-Control-Max-Age: 3600
Cache-Control: no-cache, private
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Thu, 19 Nov 2020 15:22:10 GMT
Keep-Alive: timeout=5, max=100
Vary: Origin
X-Robots-Tag: noindex

Response Headers:

Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,it;q=0.8
Access-Control-Request-Headers: content-type
Access-Control-Request-Method: GET
Cache-Control: no-cache
Connection: keep-alive
Host: http://example.com
Origin: http://front.example.com
Pragma: no-cache
Referer: http://front.example.com/
Sec-Fetch-Mode: cors

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *