spartancyberultron / apisecurityengine-v2

APISecurityEngine V2 (Full Stack)
0 stars 0 forks source link

Security headers are not implemented: #57

Open trikaratech opened 3 months ago

trikaratech commented 3 months ago

Screenshot from 2024-08-02 12-30-35

trikaratech commented 3 months ago

To solve this, the following section has to be included in the nginx config file of the concerned site.

# Add security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; img-src 'self' data: https:; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://use.fontawesome.com https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com https://use.fontawesome.com; connect-src 'self' https://backend-new.apisecurityengine.com;" always;
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;
add_header Permissions-Policy "geolocation=(self), microphone=(), camera=()" always;

Attached is the example file used for the site appnew.apisecurityengine.com. nginx_config.txt

trikaratech commented 3 months ago

Screenshot from 2024-08-07 11-59-09