Skip to content

CSS Content type headers are causing styles not to load when using a reverse proxy #885

@zastrixarundell

Description

@zastrixarundell

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the nightly release?

  • This issue is present in the nightly release

Describe the Bug

When accessing sunshine on localhost everything works fine. But when you try to use a reverse proxy like Caddy the content won't load how it should.

The server will show that the header type for the CSS content is text/plain rather than text/css.

image

Expected Behavior

The page should look normally without any issue on it's end:

image

Additional Context

Setting the Caddyfile to catch all *.css files and forcing the content-type fixes the issue:

sunshine.localhost {
        @css path *.css
        header @css Content-Type text/css

        reverse_proxy localhost:47990 {
                transport http {
                      tls_insecure_skip_verify
                }
        }
}

Host Operating System

Linux

Operating System Version

Fedora 37

Architecture

64 bit

Sunshine commit or version

nigthly

Package

Linux - flatpak

GPU Type

Nvidia

GPU Model

RTX 2070

GPU Driver/Mesa Version

525.85.05

Capture Method (Linux Only)

KMS

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions