No description
Find a file
Fabian 4913508ea6
Add Cache-Control "public,max-age=0,must-revalidate" to index.html in SPA example
Add the Cache-Control "public,max-age=0,must-revalidate" for index.html header to the SPA example.

In SPAs the index.html must be prevented from being cached, in the index.html the (hashed) javascript and css file are referenced (these can be cached becaused they get a new random suffix everytime they are built)
2024-10-11 10:14:15 -04:00
.github Create FUNDING.yml 2020-01-24 12:55:31 -07:00
demo Add Caddyfile for on-demand TLS demo 2024-02-01 16:16:15 -07:00
src Add Cache-Control "public,max-age=0,must-revalidate" to index.html in SPA example 2024-10-11 10:14:15 -04:00
.editorconfig Finish documenting Caddy 2.8.0 features (#419) 2024-09-29 05:44:26 -04:00
.gitignore Initial commit 2020-01-24 12:47:52 -07:00
Caddyfile Updated for v2.8.0 (#389) 2024-05-29 18:18:32 -04:00
README.md develop: Implementing placeholders (#409) 2024-08-22 06:58:05 -06:00

The Caddy Website

This is the source of the Caddy website, caddyserver.com.

Requirements

  • Caddy v2.7.6 or newer (installed in your PATH as caddy)
  • To display the retro hit counter (just for fun), the caddy-hitcounter plugin. Then uncomment the relevant lines in the Caddyfile.

Quick start

  1. git clone https://github.com/caddyserver/website.git
  2. cd website
  3. caddy run

Your first time, you may be prompted for a password. This is so Caddy can serve the site over local HTTPS. If you can't bind to low ports, change the address at the top of the Caddyfile, for example localhost:2015.

You can then load https://localhost (or whatever address you configured) in your browser.

Docker

You can run rootless with docker with

docker stop caddy-website || true && docker rm caddy-website || true
docker run --name caddy-website -it -p 8443:443 -v ./:/wd caddy sh -c "cd /wd && caddy run"

This will allow you to connect to https://localhost:8443