Caddy CSS override

I know with Nginx its possible to override CSS using a sub_filter. Is it possible to do the same in Caddy? There’s a bug in one of the services I use that causes text to be black on a black background and I am trying to mitigate it until its fixed.

Example Nginx config:

        proxy_set_header Accept-Encoding "";
        '<style>body, .btn-lg { color: white; } </style>
        sub_filter_once on;

Using Caddy 2.

It’s not built-in, but you can compile Caddy with this plugin to get filtering functionality:

The maintainer hasn’t added their plugin to the new download page, so you’ll need to follow the instructions to build with xcaddy found at the link below, or if you’re running with docker, with the builder image variant (see the docker hub docs).

1 Like

Awesome, I will take a look at this! Thanks!

This topic was automatically closed after 30 days. New replies are no longer allowed.