Skip to content

[Bug]: HTTP Response Headers not applying Globally using Caddy Proxy Dynamic Config #7507

@sibowilldo

Description

@sibowilldo

Error Message and Logs

I am attempting to apply HSTS, X-Content-Type-Options and other security header responses using Servers > Proxy > Dynamic Configurations > +Add.

The snippet is as below, copied from Caddy docs

:443 {
    header {
        # disable FLoC tracking
        Permissions-Policy interest-cohort=()

        # enable HSTS
        Strict-Transport-Security max-age=31536000;

        # disable clients from sniffing the media type
        X-Content-Type-Options nosniff

        # clickjacking protection
        X-Frame-Options DENY
    }
}

These unfortunately do not reflect on the websites deployed on this server.

➜ curl -I https://domain
  
HTTP/2 200 
alt-svc: h3=":443"; ma=2592000
content-type: text/html; charset=UTF-8
date: Fri, 05 Dec 2025 12:12:30 GMT
link: <https://domain/wp-json/>; rel="https://api.w.org/"
link: <https://domain/wp-json/wp/v2/pages/1105>; rel="alternate"; title="JSON"; type="application/json"
link: <https://domain/>; rel=shortlink
x-powered-by: PHP/8.3.28
x-tec-api-origin: https://domain
x-tec-api-root: https://domain/wp-json/tribe/events/v1/
x-tec-api-version: v1
Image

Steps to Reproduce

  1. Using Coolify v4.0.0-beta.452, with Caddy2 as Proxy
  2. Navigate to Servers > Proxy Tab > Dynamic Configuration sub section > Add Dynamic Configuration
  3. Restart Proxy
  4. Restart Application/s

Example Repository URL

No response

Coolify Version

v4.0.0-beta.452

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

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