Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How enable CORS on Apache in WHM

Discussion in 'EasyApache' started by papiandy, May 21, 2014.

  1. papiandy

    papiandy Member

    Joined:
    Apr 7, 2008
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    53
    Hi

    I want to add the CORS authorization .. I read this document but I don'e kwno how to implement it to my WHM

    enable cross-origin resource sharing

    Can u guys help me on this?

    Thks
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Have you tried adding the entry to your .htaccess file within the account you want it enabled on?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. HollyRidge

    HollyRidge Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    138
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Garner NC USA
    cPanel Access Level:
    Root Administrator
    I know this is old but in case someone else has this issue like I did, here is how I was able to fix it...

    Add the following line to the .htaccess file...
    Code:
    Header set Access-Control-Allow-Origin "*"
    The instructions to enable CORS say to put it into the apache configuration but considering this would get overwritten, I would add it to the .htaccess.
    enable cross-origin resource sharing

    Again sorry to open an old thread but I felt someone else may have this same issue like I did so I wanted to share since I could not find anything else relevant to fix it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice