How to set up CORS (cross-origin resource sharing) in Plesk for Linux?

Follow

Comments

3 comments

  • Avatar
    Alex

    This actually worked for me, had to apply rule to both apache and nginx

    0
    Comment actions Permalink
  • Avatar
    Maghreb Services SARL

    Is this still the best way to enable CORS? In Plesk Obsidian we've been able to enable CORS for both Apache and nginx (as long as Proxy mode is enabled, so not for nginx standalone) by setting additional headers in the Common Apache settings section, with this format:

    Access-Control-Allow-Origin: example1.com

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Maghreb,

    Thank you for sharing your user experience.

    Your solution also works fine as a server-wide one.

    However, the solution specified in the article is more flexible as allows more granular setting per domain.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request