nginx as rtmp server - Resource interpreted as Stylesheet but transferred with MIME type text/xml loading stats

I am using nginx as rtmp server using this rtmp module https://github.com/arut/nginx-rtmp-module and I am trying to get to the stats page but when trying to view the stats at http://ip:8080/stat/stat.xsl I get a blank page with the following in the console on Chrome:

Resource interpreted as Stylesheet but transferred with MIME type text/xml: "http://ip:8080/stat/stat.xsl".

and this error on Firefox Error loading stylesheet: Parsing an XSLT stylesheet failed.

I've tried and tried, but have been unable to resolve this issue. This is the relevant part of the nginx.conf:

http {
    include /usr/local/nginx/conf/mime.types;
    #default_type  application/octet-stream;

    server {
        listen 8080;
        location /hls {
                types {
                    application/vnd.apple.mpegurl m3u8;
                }
        alias /HLS/hls;
        add_header Cache-Control no-cache;
        } 

        location /stat {
                types {
                    application/xml dae;
                }
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
        location /stat.xsl {
                types {
                    application/xml dae;
                }
            root /usr/local/nginx/html/stat.xsl/;
        }    
    }
}

This is what looks like the relevant part of the mimes.types file for nginx:

types {
    text/html                                        html htm shtml;
    text/css                                         css;
    text/xml                                         xml;
    image/gif                                        gif;
    image/jpeg                                       jpeg jpg;
    application/javascript                           js;
    application/atom+xml                             atom;
    application/rss+xml                              rss;

    text/mathml                                      mml;
    text/plain                                       txt;
    text/vnd.sun.j2me.app-descriptor                 jad;
    text/vnd.wap.wml                                 wml;
    text/x-component                                 htc;

    image/png                                        png;
    image/svg+xml                                    svg svgz;
    image/tiff                                       tif tiff;
    image/vnd.wap.wbmp                               wbmp;
    image/webp                                       webp;
    image/x-icon                                     ico;
    image/x-jng                                      jng;
    image/x-ms-bmp                                   bmp;

    font/woff                                        woff;
    font/woff2                                       woff2;

    application/xml                                  xsl;

I'm sure that this is an issue with MIME types as in the Chrome console, I can click on the file and see the content of stats.xsl in console, but it just doesn't render on the page.

Any ideas on what I might be doing wrong?

Thank you.

728x90

0 Answers nginx as rtmp server - Resource interpreted as Stylesheet but transferred with MIME type text/xml loading stats