Get the most out of your Centmin Mod LEMP stack
Become a Member

How can I enable CORS for Nginx?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, May 9, 2017.

  1. pamamolf

    pamamolf Well-Known Member

    May 31, 2014
    Local Time:
    11:00 PM
    MariaDB 10.1.x
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed:1.13.0
    • PHP Version Installed: 7.0.18
    • MariaDB MySQL Version Installed: 10.1.23
    • When was last time updated Centmin Mod code base ? : just now

    Hello :)

    How can I enable CORS for Nginx?

    Do I need to recompile?
    What parameters to use?
    Any way to make it persistent?

    Can that cause any issues related to Let's Encrypt?

    Thank you
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    6:00 AM
    Nginx 1.13.x
    MariaDB 5.5
    no CORS is purely nginx header configuration you need to figure out and yes it can cause issues if misconfigured

    you're on your own configuring CORS headers, read

    Using CORS - HTML5 Rocks