I encountered error status 405 Method Not Allowed on OPTIONS Pre-flight. I configured the kentico cms with everything i can on Access-Control-Allow-Methods and the response header shows the correct method as well. However, i notice that there are another Allow key in response header as well, i suspect that is the issue that my request fail. But I cannot find the settings for this Allow header anywhere, can i remove this Allow header? Or are there any other settings i possibly missed out?
Here are all my Response Headers from pre-flights OPTIONS request:
HTTP/1.1 405 Method Not Allowed
Cache-Control: private
Allow: GET, PUT, POST, DELETE
Content-Type: text/html; charset=UTF-8
Server: Microsoft-IIS/8.5
X-Frame-Options: SAMEORIGIN
X-AspNet-Version: 4.0.30319
Set-Cookie: ASP.NET_SessionId=gpvyrhgjk0cpplzn1uir2tcx; path=/; HttpOnly; SameSite=Lax
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: http://localhost:7888
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Allow-Headers: Authorization,Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Credentials: true
Date: Wed, 19 Jan 2022 05:09:26 GMT
Content-Length: 1565
Here are all my Request Headers from pre-flights OPTIONS request:
OPTIONS /kentico_admin/rest/content/currentsite/en-us/document/Header HTTP/1.1
Host: preview.website.net
Connection: keep-alive
Accept: */*
Access-Control-Request-Method: GET
Access-Control-Request-Headers: authorization
Origin: http://localhost:7888
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Sec-Fetch-Mode: cors
Referer: http://localhost:7888/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9