Hugo 0.67.0: Custom HTTP headers
The two main items in Hugo 0.67.0 is custom HTTP header support in hugo server
and include/exclude filters for Hugo Deploy.
Being able to configure HTTP headers in your development server means that you can now verify how your site behaves with the intended Content Security Policy settings etc., e.g.:
server:
headers:
- for: /**.html
values:
Content-Security-Policy: script-src localhost:1313
Referrer-Policy: strict-origin-when-cross-origin
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
[server]
[[server.headers]]
for = '/**.html'
[server.headers.values]
Content-Security-Policy = 'script-src localhost:1313'
Referrer-Policy = 'strict-origin-when-cross-origin'
X-Content-Type-Options = 'nosniff'
X-Frame-Options = 'DENY'
X-XSS-Protection = '1; mode=block'
{
"server": {
"headers": [
{
"for": "/**.html",
"values": {
"Content-Security-Policy": "script-src localhost:1313",
"Referrer-Policy": "strict-origin-when-cross-origin",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"X-XSS-Protection": "1; mode=block"
}
}
]
}
}
Note: This release also changes how raw HTML files inside /content is processed to be in line with the documentation. See #7030.
This release represents 7 contributions by 4 contributors to the main Hugo code base.@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @satotake, @sams96, and @davidejones for their ongoing contributions. And a big thanks to @digitalcraftsman and @onedrawingperday for their relentless work on keeping the themes site in pristine condition and to @davidsneighbour and @kaushalmodi for all the great work on the documentation site.
Many have also been busy writing and fixing the documentation in hugoDocs, which has received 5 contributions by 5 contributors. A special thanks to @bep, @psliwka, @digitalcraftsman, and @jasikpark for their work on the documentation site.
Hugo now has:
- 42176+ stars
- 439+ contributors
- 301+ themes
Enhancements
Other
- Doument the server config 63393230 @bep
- Support unComparable args of uniq/complement/in 8279d2e2 @satotake #6105
- Add HTTP header support for the dev server 10831444 @bep #7031
- Add include and exclude support for remote 51e178a6 @davidejones
Fixes
Templates
Other
Improve this page