Skip to content

Hide server info and add security headers #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

jimsihk
Copy link
Contributor

@jimsihk jimsihk commented Aug 15, 2022

NGINX and PHP-FPM versions are currently exposed in HTTP headers which are considered not secure enough as exposed OS info. Also added HTTP response headers for higher security.

References:
https://kubernetes.github.io/ingress-nginx/deploy/hardening-guide/
https://www.upguard.com/blog/how-to-build-a-tough-nginx-server-in-15-steps
https://beaglesecurity.com/blog/article/nginx-server-security.html
https://stackoverflow.com/questions/962230/hide-x-powered-by-nginx

@jimsihk jimsihk changed the title Hide server info for security hardening Hide server info and add security headers Aug 15, 2022
@TrafeX
Copy link
Owner

TrafeX commented Sep 6, 2022

I would recommend everyone to apply all these headers, but I'm afraid they can break some webapps.
Therefor I don't think we should include this by default.

Removing the server info is good practice and can't do any harm. If you can remove the add_header's then I can merge this

@jimsihk
Copy link
Contributor Author

jimsihk commented Sep 7, 2022

Thanks for your thought, branch updated

@TrafeX
Copy link
Owner

TrafeX commented Sep 7, 2022

Thank you for your contribution @jimsihk !

@TrafeX TrafeX merged commit 15dba68 into TrafeX:master Sep 7, 2022
@jimsihk jimsihk deleted the hardening branch September 7, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants