Plesk

Error in browser console on website that requests content from another website hosted on Plesk for Linux server: The ‘Access-Control-Allow-Origin’ header contains multiple values, but only one is allowed

Symptoms

Cause

The HTTP header Access-Control-Allow-Origin is duplicated.

Resolution

  1. Log in to Plesk.

  2. Check the following places for directive that adds the header Access-Control-Allow-Origin:

    • Both fields under Additional Apache directives in Domains > example.com > Hosting & DNS > Apache & nginx Settings.

    • The field Additional nginx directives in Domains > example.com > Hosting & DNS > Apache & nginx Settings.

    • The file .htaccess in the website content.

  3. Remove the directives that add the header Access-Control-Allow-Origin from 2 of 3 of above places, leaving only one of them.

Exit mobile version