CSS file in Facebook app being served up as text/html

I’m hosting a Facebook canvas app on my server and a CSS file is not
getting loaded because it’s apparently being served up as text/html and
not text/css.

I have no problems with the css files on my web site hosted on the same
server and my nginx conf has the standard mime types file loaded in the
conf.

Not sure why calling it in a facebook iframe is causing the error.
Here’s the dump from Live HTTP Headers:

GET /myappname/multifriend.css HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101
Firefox/6.0.2
Accept: text/css,/;q=0.1
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Referer: https://www.example.com/myappname/invite3.php

HTTP/1.1 200 OK
Date: Fri, 23 Sep 2011 06:28:49 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.3.6

Thanks!

I have no problems with the css files on my web site hosted on the same server
and my nginx conf has the standard mime types file
loaded in the conf.

Post your nginx config since you may have a misconfiguration somewhere
and css files are being served through php - header line’
X-Powered-By: PHP/5.3.6’ indicates that (it shouldn’t be there for
static content).

p.s. If that is intended though you will have to modify your php and add

<? header('Content-type: text/css'); ?> at the top.

rr

On 23/09/2011 7:09 AM, Reinis R. wrote:

Post your nginx config since you may have a misconfiguration somewhere
and css files are being served through php - header line’ X-Powered-By:
PHP/5.3.6’ indicates that (it shouldn’t be there for static content).

You hit the nail on the head…I don’t do much work on the SSL side of
my server and forgot to allow it to be served directly.

Thanks.