-
Notifications
You must be signed in to change notification settings - Fork 681
5.x Security
On this page we will detail some recommended security configurations for OrangeHRM Starter.
This section will list out some recommended HTTP headers. You will need to add these to your Apache / NGINX configuration.
| Header | Recommend | Apache | NGINX |
|---|---|---|---|
| X-Frame-Options | DENY |
Header set X-Frame-Options DENY |
add_header X-FRAME-Options DENY |
| X-Content-Type-Options | nosniff |
Header set X-Content-Type-Options nosniff |
add_header X-Content-Type-Options nosniff |
| X-XSS-Protection | 0 |
Header set X-XSS-Protection 0 |
add_header X-XSS-Protection 0 |
| Server | Hide this header | ServerTokens Prod |
server_tokens off |
| X-Powered-By | Hide this header |
expose_php = Off (in php.ini) |
proxy_hide_header X-Powered-By or `fastcgi_hide_header X-Powered-By |
You can find the reasoning for these recommendations below.
- Recommendation:
DENY - Add to:
- Apache:
Header set X-Frame-Options DENY - NGINX:
add_header X-Frame-Options DENY
- Apache:
This header is used to prevent clickjacking. It informs the browser whether a resource can be embedded in another site.
If you set "DENY", your OrangeHRM application will not be embeddable on other sites (and not even on the same site).
- References
- Recommendation:
nosniff - Add to:
- Apache:
Header set X-Content-Type-Options nosniff - NGINX:
add_header X-Content-Type-Options nosniff;
- Apache:
This header is used to prevent content/MIME sniffing (i.e. it prevents the browser from going through the resource to guess the MIME type).
- References:
- Recommendation:
0 - Add to:
- Apache:
Header set X-XSS-Protection 0 - NGINX:
add_header X-XSS-Protection 0
- Apache:
This header should be disabled as it introduces more vulnerabilities than it prevents. You should explicitly define this as 0 rather than leaving it out.
- References
- Recommendation: Hide this header
- Add to:
- Apache:
expose_php = Off(in php.ini) - NGINX:
proxy_hide_header X-Powered-Byorfastcgi_hide_header X-Powered-By
- Apache:
This header exposes information on the technology used by the server. You should hide it to prevent attackers from identifying your tech stack easily.
- References
- Recommendation: Hide this header
- Add to
- Apache:
ServerTokens ProdandServerSignature Off - NGINX:
server_tokens off(only removes the version)
- Apache:
This header exposes information on the server. You should hide it (or limit the information provided) to prevent attackers from identifying your server easily.