Adapt to new middleware model

This commit is contained in:
Daniel Berteaud 2024-01-28 22:50:52 +01:00
parent 8a8974103d
commit 7c16e18a58
2 changed files with 2 additions and 3 deletions

View File

@ -57,7 +57,8 @@ job "diagrams" {
"traefik.http.routers.diagrams.rule=Host(`draw.example.org`)",
"traefik.http.routers.diagrams.entrypoints=https",
"traefik.http.middlewares.diagrams-csp.headers.contentsecuritypolicy=connect-src 'self' https://*.dropboxapi.com https://api.trello.com https://api.github.com https://raw.githubusercontent.com https://*.googleapis.com https://*.googleusercontent.com https://graph.microsoft.com https://*.1drv.com https://*.sharepoint.com https://gitlab.com https://*.google.com https://fonts.gstatic.com https://fonts.googleapis.com;default-src 'self';font-src * about:;frame-src 'self' https://*.google.com;img-src * data:;media-src * data:;script-src 'self' https://storage.googleapis.com https://apis.google.com https://docs.google.com https://code.jquery.com 'unsafe-inline';style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;",
"traefik.http.routers.diagrams.middlewares=diagrams-csp,rate-limit-std@file,inflight-std@file,security-headers@file,hsts@file",
"traefik.http.middlewares.diagrams-proxy.headers.customrequestheaders.X-Forwarded-Proto=https",
"traefik.http.routers.diagrams.middlewares=security-headers@file,rate-limit-std@file,diagrams-proxy,inflight-std@file,hsts@file,compression@file,diagrams-csp",
]
}

View File

@ -7,9 +7,7 @@ diagrams:
env: {}
public_url: https://draw.example.org
traefik:
enabled: true
csp:
default-src: "'self'"
script-src: "'self' https://storage.googleapis.com https://apis.google.com https://docs.google.com https://code.jquery.com 'unsafe-inline'"
connect-src: "'self' https://*.dropboxapi.com https://api.trello.com https://api.github.com https://raw.githubusercontent.com https://*.googleapis.com https://*.googleusercontent.com https://graph.microsoft.com https://*.1drv.com https://*.sharepoint.com https://gitlab.com https://*.google.com https://fonts.gstatic.com https://fonts.googleapis.com"
img-src: " * data:"