1

My Angular app's cross-domain requests through Apache work on Google Chrome, but fail on Firefox with an Error: a security problem occurred error.

Here's the Apache configuration for my Django app:

    <Location />  
            Header always set Access-Control-Allow-Origin http://stage.myangularsite.com
            Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
            Header always set Access-Control-Max-Age "1000"
            Header always set Access-Control-Allow-Credentials: true
            Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, authentication, accept, client-security-token"
            Header always set Access-Control-Request-Headers "x-requested-with, Content-Type, origin, authentication, client-security-token"

            AuthType Basic
            AuthName "Authentication Required"
            AuthUserFile "/home/user/.htpasswd" 
            Require valid-user
    </Location>

FYI, On the receiving app, I am using django-cors-headers and django-rest-framework.

Kevin Brown-Silva
  • 39,112
  • 40
  • 199
  • 230
rebelliard
  • 9,472
  • 6
  • 45
  • 78

1 Answers1

0

I think what your are looking for is the xDomain Library.

You can find some info on it at this question:

Community
  • 1
  • 1
Charlesthk
  • 8,666
  • 5
  • 37
  • 44