for one request in our application we are faced below errors
- if the request gone from the "browser" we are getting : CORS Error (Cross-Origin Resource Sharing error: MissingAllowOrginHeader
- if the request gone from the "curl" we are getting : bellow response
<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 15568950195360322224<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>
and in our dev environment or local systems we never use to face this error.
after investigation we found out the culprit is the request headers starts with "Sec-CH*"
'sec-ch-ua-platform: "Windows"' 'sec-ch-ua-mobile: ?0' 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Microsoft Edge";v="96"'
so we have to open the browser with this feature off. (which will stop sending the above header in the request)
chrome --disable-features=UserAgentClientHint msedge --disable-features=UserAgentClientHint
this resolves the issue from client side...
now we have to see why our server is acting wierd with this headers..... (maybe in another post)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.