Headers Up! What's New in httpd and relayd
In a recent development, OpenBSD's httpd and relayd have seen new features implemented. httpd can now handle HTTP response headers directly in httpd.conf, eliminating the need for relayd or additional firewall rules for tasks like adding security headers or blocking unwanted clients. The new header directive offers three options: set, add, and remove, each allowing for precise control over which headers are included or excluded.
By default, headers apply to 2xx and 3xx responses, but this can be altered to include error responses as well. Moreover, httpd can now reject incoming requests based on request headers, enhancing security against AI scrapers and vulnerability scanners. Additionally, relayd's filter rules for cookie, header, path, query, and url now support pattern matching, enabling more specific and complex rules.
This development has been tested and is now running in production without issues, with further stress tests planned.
Rewritten by urgent.news; may contain errors — check the original.