From 2af5d1095a743400918978c9aaa5e622acdd7197 Mon Sep 17 00:00:00 2001 From: Cameron Brooks <95648474+CameronBrooks11@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:10:28 -0500 Subject: [PATCH 1/3] fix(contact): remove the mailto form that sent an empty email None of the form's fields had a name attribute and no script handled submit, so "Send message" opened a blank mailto: with nothing the visitor typed. The page now points straight at the address. --- dist/contact.html | 27 +-------------------------- src/pug/contact.pug | 28 +--------------------------- 2 files changed, 2 insertions(+), 53 deletions(-) diff --git a/dist/contact.html b/dist/contact.html index 2398803..b1994c7 100644 --- a/dist/contact.html +++ b/dist/contact.html @@ -55,35 +55,10 @@

Get in touch.

- Form submission is being set up. Reach us directly at  + Email us directly at  contact@integrumsys.com
- -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-

Email   diff --git a/src/pug/contact.pug b/src/pug/contact.pug index 9089cc6..9702c13 100644 --- a/src/pug/contact.pug +++ b/src/pug/contact.pug @@ -37,36 +37,10 @@ html(lang="en") .col-lg-7 // Direct email notice .alert.mb-4(style="background-color: #e6f7f8; border: 1px solid #0e9aa7; color: #0b1220") - | Form submission is being set up. Reach us directly at  + | Email us directly at  a.fw-500(href="mailto:contact@integrumsys.com" style="color: #0b7f89") contact@integrumsys.com - // Contact form - form(action="mailto:contact@integrumsys.com" method="GET") - // Name - .form-floating.mb-3 - input#name.form-control(type="text" placeholder="Full name" required) - label(for="name") Full name - - // Email - .form-floating.mb-3 - input#email.form-control(type="email" placeholder="name@example.com" required) - label(for="email") Email address - - // Phone (optional) - .form-floating.mb-3 - input#phone.form-control(type="tel" placeholder="Phone number (optional)") - label(for="phone") Phone number (optional) - - // Message - .form-floating.mb-4 - textarea#message.form-control(placeholder="Message" required style="height: 10rem") - label(for="message") Message - - .d-grid - button.btn.btn-primary.btn-lg(type="submit") Send message - // Direct contact - hr.my-4(style="border-color: #d7dee8") p.mb-1 span.font-mono.small(style="color: #3b4a5e") Email | From 2daeae72fd9217b1a86ccd2f65c06618365600ea Mon Sep 17 00:00:00 2001 From: Cameron Brooks <95648474+CameronBrooks11@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:10:28 -0500 Subject: [PATCH 2/3] build: serve the site from a Cloudflare Worker The site is static, so an assets-only Worker serves the committed dist/ and Workers Builds deploys on push to master. That replaces the manual git pull on the VPS, which left the favicon commit undeployed. src/_headers adds HSTS, framing, referrer and permissions headers; the CSP ships report-only until every page shows a clean console. CI now fails if the build stops copying _headers into dist/. --- .github/workflows/ci.yml | 4 ++++ README.md | 44 ++++++++-------------------------------- dist/_headers | 7 +++++++ scripts/render-assets.js | 1 + src/_headers | 7 +++++++ wrangler.jsonc | 9 ++++++++ 6 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 dist/_headers create mode 100644 src/_headers create mode 100644 wrangler.jsonc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6472cf6..4161e31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,3 +47,7 @@ jobs: fi done echo "All 7 pages present in dist/" + if [ ! -f dist/_headers ]; then + echo "MISSING: dist/_headers" + exit 1 + fi diff --git a/README.md b/README.md index 0ce786e..e42b116 100644 --- a/README.md +++ b/README.md @@ -50,28 +50,19 @@ GitHub Actions runs on every push and pull request to `master`: 1. Prettier format check 2. Full build 3. Fail if `dist/` does not match a clean rebuild -4. Verify all 7 HTML pages are present in `dist/` +4. Verify all 7 HTML pages and `_headers` are present in `dist/` -Step 3 matters because the server serves the committed `dist/` and never runs a +Step 3 matters because Cloudflare serves the committed `dist/` and never runs a build. Without it, `src/` and `dist/` can drift apart and CI stays green while the live site is stale. A sibling site ran 20 months behind `master` before anyone noticed. ## Deployment -The site runs on a Vultr VPS behind Cloudflare. Apache serves the committed -`dist/` from `/var/www/integrumsys.com/dist` — **the server never runs a build**, -so whatever is committed under `dist/` is what visitors get. - -Deployment is a manual pull: - -```sh -ssh linuxuser@integrumsys.com -cd /var/www/integrumsys.com -sudo git pull --ff-only origin master -``` - -No restart is needed; Apache reads the files on each request. +The site is a Cloudflare Worker with static assets only: Cloudflare serves the +committed `dist/` and never runs a build (`wrangler.jsonc`). Workers Builds +deploys on every push to `master`, so whatever is committed under `dist/` is +what visitors get. A source change is only live once the rebuilt `dist/` is committed too: @@ -81,26 +72,9 @@ npm run build git add dist/ && git commit ``` -### Server notes - -- SSH is key-only; password authentication is disabled and `PermitRootLogin` is - `prohibit-password`. `linuxuser` has passwordless sudo, so that key alone is - root. Its password is deliberately left set — it is the only Vultr console - fallback if the key ever fails. -- fail2ban guards SSH with escalating bans. Before it was installed the box was - taking roughly 9,000 failed authentication attempts per day. -- ufw allows 22 and 80 from anywhere, but **443 only from Cloudflare's published - ranges**, so the origin cannot be reached directly. Refresh the ranges from - and `ips-v6` if the site becomes - intermittently unreachable — Cloudflare adds ranges occasionally, and a missing - one fails for a subset of edges rather than outright. -- **Port 80 must stay open.** Certbot uses the `apache` authenticator (HTTP-01), - so restricting port 80 breaks certificate renewal — and the failure surfaces up - to 90 days later as a browser warning, with no email since Let's Encrypt - stopped expiry notifications. Closing it requires moving to DNS-01 first. - Verify any firewall or vhost change with - `sudo /snap/bin/certbot renew --dry-run` (certbot is a snap; non-interactive - SSH needs the full path). +Response headers (HSTS, CSP, framing) live in `src/_headers`, which the build +copies to `dist/_headers`. The CSP ships as `Content-Security-Policy-Report-Only` +until a pass over every page shows no violations in the browser console. ## License diff --git a/dist/_headers b/dist/_headers new file mode 100644 index 0000000..e6eb55a --- /dev/null +++ b/dist/_headers @@ -0,0 +1,7 @@ +/* + Strict-Transport-Security: max-age=31536000 + X-Content-Type-Options: nosniff + X-Frame-Options: DENY + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), geolocation=(), microphone=(), payment=(), usb=() + Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://cdn.jsdelivr.net https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; object-src 'none' diff --git a/scripts/render-assets.js b/scripts/render-assets.js index 1e38850..a3761c2 100644 --- a/scripts/render-assets.js +++ b/scripts/render-assets.js @@ -8,4 +8,5 @@ module.exports = function renderAssets() { const destPath = upath.resolve(upath.dirname(__filename), '../dist/.'); sh.cp('-R', sourcePath, destPath); + sh.cp(upath.resolve(upath.dirname(__filename), '../src/_headers'), destPath); }; diff --git a/src/_headers b/src/_headers new file mode 100644 index 0000000..e6eb55a --- /dev/null +++ b/src/_headers @@ -0,0 +1,7 @@ +/* + Strict-Transport-Security: max-age=31536000 + X-Content-Type-Options: nosniff + X-Frame-Options: DENY + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), geolocation=(), microphone=(), payment=(), usb=() + Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://cdn.jsdelivr.net https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; object-src 'none' diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..d24ea0c --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,9 @@ +// Assets-only Worker: Cloudflare serves the committed dist/ directly. +// There is no Worker script and no build step on Cloudflare's side. +{ + "name": "integrumsys-com", + "compatibility_date": "2026-11-01", + "assets": { + "directory": "./dist", + }, +} From 6b0332f39f0b8027f8d50ca642df7236b4e61b70 Mon Sep 17 00:00:00 2001 From: Cameron Brooks <95648474+CameronBrooks11@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:14:54 -0500 Subject: [PATCH 3/3] docs(readme): record how Cloudflare serves the .html paths Measured with wrangler dev against the committed dist/. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e42b116..b8fe69a 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,11 @@ Response headers (HSTS, CSP, framing) live in `src/_headers`, which the build copies to `dist/_headers`. The CSP ships as `Content-Security-Policy-Report-Only` until a pass over every page shows no violations in the browser console. +Cloudflare serves each page at its extensionless path: `/about.html` answers +with a 307 to `/about`, and `/` serves `index.html`. The internal `.html` +links still work, through that redirect. `html_handling: "none"` would keep +the `.html` paths but returns 404 for `/`. + ## License MIT — see [LICENSE](LICENSE).