My CSS is hosted on https://www.site1.com (it is an authenticated domain) and it uses woff/ttf
files located on https://media.site1.com (it is also authenticated - same auth than www). To connect to these sites, I must use an authenticated proxy.
I have to enable CORS to allow cross domain loading, but it seems that I can't load resources from another domain if this domain is basic-authenticated AND I use an authenticated proxy.
I have added in Apache the following directives:
SetEnvIf Origin "^http(s)?://(.*)$" origin_is=$0
Header set Access-Control-Allow-Origin %{origin_is}e env=origin_is
Header set Access-Control-Allow-Credentials "true"
Header set Access-Control-Allow-Headers "*"
It should allow all Origin, but when the CSS loads the woff
file (via GET request), I get:
Request (only interesting headers) :
GET file.woff HTTP/1.1
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Host media.site1.com
Origin https://www.site1.com
Proxy-Authorization Basic XXX1234567
Connection keep-alive
Cache-Control max-age=0
Response (as seen by Firebug or Httpfox) :
HTTP/1.0 401 Unauthorized
WWW-Authenticate BASIC realm="Unspecified"
Server BigIP
Connection close
Content-Length 0
If I manually authenticate to media.site1.com
before going to www, the result is the same. It seems that the browser does not send basic-auth credentials to the "media" server.
Are there any additional headers I have to set to ensure that WOFF files are loaded from a different location, with basic-authentication and eventually with an enterprise authenticated proxy?