Skip to main content

Access-Control-Allow-Origin not working

Comments

8 comments

  • cPanelKenneth
    Hi, Are you trying to get Access-Control-Allow-Origin to work with your websites? Or with cPanel &WHM?
    0
  • tnt16
    Hi, Websites.
    0
  • Anupam SG
    Posting your .htaccess might help too. The code for CORS needs to be between . For example: Header set Access-Control-Allow-Origin '*'
    0
  • cPanelLauren
    Hi, Websites.

    I know you mention that mod_headers is enabled but none the less, what is the output of the following? httpd -M |grep headers
    And as @Anupam SG noted, what is the .htaccess code you've used? How are you determining it's not working? Do you have any redirects present?
    0
  • tnt16
    httpd -M |grep headers headers_module (shared) in htaccess: Header set Access-Control-Allow-Origin '*'
    0
  • SamuelM
    Hello @tnt16, Please feel free to submit a ticket using the link in my signature so that we can investigate this for you further.
    0
  • z3d3m0n
    httpd -M |grep headers headers_module (shared) in htaccess: Header set Access-Control-Allow-Origin '*'

    Hey, how did you solve this issue? i have exactly the same problem
    0
  • cPanelAnthony
    @z3d3m0n Hey there! Could you elaborate upon the specific Access-Control-Allow-Origin issue you are having? Are you receiving a specific error message? Often these types of errors are caused by the CORS policy headers being set up incorrectly. We do have instructions on adding these headers here:
    -1

Please sign in to leave a comment.