gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.49k stars 7.44k forks source link

HTML files are hard to match in the server header config #9153

Open bep opened 2 years ago

bep commented 2 years ago

See https://discourse.gohugo.io/t/cant-make-the-local-server-use-headers/35519

REQ /docs/
REQ /favicon.ico
REQ /docs/
REQ /
REQ /fonts/muli-latin-200.woff2
REQ /fonts/muli-latin-400.woff2
REQ /fonts/muli-latin-800.woff2
REQ /output/css/app.css
REQ /output/js/app.js
REQ /images/hugo-logo-wide.svg
REQ /images/icon-fast.svg
REQ /images/icon-content-management.svg
REQ /images/icon-shortcodes.svg
REQ /images/icon-built-in-templates.svg
REQ /images/icon-multilingual2.svg
REQ /images/icon-custom-outputs.svg
REQ /images/sponsors/linode-logo_standard_light_medium.png
REQ /images/sponsors/esolia-logo.svg
REQ /images/sponsors/brave-logo.svg
REQ /images/homepage-screenshot-hugo-themes.jpg
REQ /images/home-page-templating-example.png
REQ /images/gopher-hero.svg
REQ /images/GitHub-Mark-64px.png
REQ /images/gopher-side_color.svg
REQ /favicon-32x32.png
REQ /fonts/muli-latin-700.woff2
REQ /fonts/muli-latin-400italic.woff2
REQ /manifest.json
REQ /android-chrome-144x144.png
khayyamsaleem commented 2 years ago

Is this something that can be solved with just documentation? I would call that for key a requestURI matcher rather than a file matcher.

If this kind of functionality is desired, it would probably require a bit of ugly work to handle the .html extension, as it is a special case for the file server also.