1

hello i am using ngnix as a static server I am getting a error in chrome only [ Ensure preflight responses are valid ]

i tried proxy_hide_header "Access-Control-Allow-Origin" add_header 'Access-Control-Allow-Origin' $http_origin always
add_header 'Access-Control-Allow-Credentials' true always add_header 'Access-Control-Allow-Private-Network' true always proxy_redirect off proxy_http_version 1.1 add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' add_header Content-Type text/plain add_header Content-Length 0

if ($request_method = OPTIONS){ return 204 "No Content"}

please help me reslove this problem and send a config which can deal this and i am using tomcat server as my proxy pass , if i could change anything in tomcat server side also let me know

0 Answers0