Skip to content

Instantly share code, notes, and snippets.

@christian-draeger
Last active August 21, 2020 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christian-draeger/e4653f8c687770cdccee0d26788e40e0 to your computer and use it in GitHub Desktop.
Save christian-draeger/e4653f8c687770cdccee0d26788e40e0 to your computer and use it in GitHub Desktop.
add custom http-header to every outgoing request (system wide)

info: will only work for systems that use apache2 like most linux ones (path to httpd.conf may vary depending on OS)

check if httpd.conf exists

ls /etc/apache2/httpd.conf

open it and scroll to bottom of file:

cat /etc/apache2/httpd.conf

you should see some include like Include /private/etc/apache2/other/*.conf that will include all configs from that certain path.

let's create extra config: (switch to root)

echo '<IfModule mod_headers.c> Header append HEADER_NAME "VALUE" </IfModule>' > /private/etc/apache2/other/extraheader.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment