Uploaded CSS wont render - transfered with MIME type text/html



  • Hello everyone.

    I sent up all files I neet to host my captive portal front page, and I use a.js and some .css files. I uploaded all the images, css and js files to the captive and set up them accordingly, considering the name changing on upload to captiveportal-file.js (for ex.)

    But when trying to preview the page on the webgui I have this error:

    Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://20.15.19.9:8002/captiveportal-style.css".
    index.php:16 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://20.15.19.9:8002/captiveportal-v4.css".
    index.php:17 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://20.15.19.9:8002/captiveportal-v4_mobile.css".
    

    And Im loading them as follows on the .html file:

    also Im trying to use svg, I read some other posts that I have to change some settings on lighttpd, but thats another history, and I can change them to png, or jpg after, but for now I just wanted the page to be loaded as I can see it on brackets. Did I miss something to work with css and pfsense captive portal?

    I want to get this result:

    But I got this when calling preview from the webgui:



  • Well, I tried some steps:

    • Via ssh, used the pFsene.css file as refference, and pasted my css over a copy of it, so the encoding would be the same as a already working css, no success.

    • before uploading, changed the encoding of css file to utf-8 on sublime, with iconv and recode, no success.

    • revamp all code only to have the suggest block

    <form>from the captive portal, and setup simple css / js rules to it, same result.

    Just to be sure so I could keep researching, is it possible to use css and js with pfsense captive portal? What should I have in mind or setup to use such tools?</form>



  • Google knows a lot about "Resource interpreted as Stylesheet but transferred with MIME type text/html".
    It isn't a pfSense or FreeBSD or even nginx or apache2 issue.

    It happens when …. well .... you'll find it out.

    I'm also using this :

    
    		<title>xXx</title>
    
    .....
    

    The file "captiveportal-style.css" is the uploaded style.css file.
    Always worked for me.