mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-23 00:48:48 +00:00
Serve security headers via static-web-server, drop Cloudflare deploy path
Production (Dokploy/Docker) was sending no security headers at all - static/_headers and wrangler.toml were Cloudflare Pages/Workers config that static-web-server never reads. Added sws.toml with the same CSP/security headers and the two redirects from _redirects, wired into the Dockerfile. Removed wrangler.toml, static/_headers, static/_redirects, the wrangler devDependency/deploy script, and related .gitignore/.dockerignore entries since Cloudflare deploy is no longer used. Also fixed a console error in theme.js where the Utterances postMessage call could fire before the comments iframe navigated to utteranc.es.
This commit is contained in:
+3
-3
@@ -1,9 +1,8 @@
|
||||
# Multi-stage build: generate llms.txt with Node, build the site with Zola,
|
||||
# then serve the static output with static-web-server.
|
||||
#
|
||||
# This is the Dokploy/self-hosted deployment path. It's independent of the
|
||||
# Cloudflare Pages path (`npm run deploy` / wrangler.toml) - that stays in
|
||||
# place as an option, this doesn't replace it.
|
||||
# This is the Dokploy/self-hosted deployment path (the only one - the prior
|
||||
# Cloudflare Pages/Workers path has been retired).
|
||||
|
||||
FROM node:22-slim AS llms
|
||||
WORKDIR /project
|
||||
@@ -18,4 +17,5 @@ RUN ["/zola", "build"]
|
||||
|
||||
FROM ghcr.io/static-web-server/static-web-server:2
|
||||
COPY --from=zola /project/public /public
|
||||
COPY sws.toml /sws.toml
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user