Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I installed SharePoint 2019 farm 2 Nodes (App & Search) and (Web & Cache).
When I try to search or click any button I get this error:

"
Access to XMLHttpRequest at 'http://sp-web:8080/_api/search/searchcenterurl?suxrid=ms-oil-datasource-searchcenterurl' from origin 'http://localhost:8080' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '1; RequireReadOnly', but only one is allowed.
"

What I have tried:

I tried to google it but most of the results are related to Web API websites.
Posted
Updated 4-Feb-22 4:40am

1 solution

Your SharePoint site is either sending multiple Access-Control-Allow-Origin headers, or one Access-Control-Allow-Origin header with multiple values. Neither is allowed.

You need to fix your SharePoint configuration so that it only sends this header once, and only specifies a single value.

This thread might be relevant:
For this we have to disable the "Request Management" service on the SharePoint server.
 
Share this answer
 
Comments
Al Mosaaed 5-Feb-22 3:43am    
Is there an article to read and fix my web.config

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900