mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 17:23:04 +03:00
Nginx configuation add_header Permissions-Policy #1553
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IssueFindings on GitHub.
Hello,
I try to configure the access to bitwarden through Nginx. When I test my Nginx configuration with https://www.immuniweb.com/websec/, I just get this error message : "PERMISSIONS-POLICY : The header is not properly set." and nothing more...
I don't understand my mistake in the code below :
add_header Permissions-Policy "usb=(), geolocation=(), midi=(), notifications=(), push=(), sync-xhr=(self, https://haveibeenpwned.com, https://twofactorauth.org), microphone=(), camera=(), magnetometer=(), gyroscope=(), speaker=(), vibrate=(), fullscreen=(self), payment=()";Anyone could you help me ?
Have a nice day.
@IssueFindings commented on GitHub:
Sorry for the delay... and many thanks for your answer. Based on it, I update my Permissions-Policy as below
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), camera=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), sync-xhr=(self 'https://haveibeenpwned.com' 'https://twofactorauth.org'), usb=(), vr=()";That works even if an alert is displayed because of old Feature-Policy. That could be great to update your code ;-)
Again, many thanks !!
@BlackDex commented on GitHub:
@IssueFindings well looking in our code i see that we use the old draft name for this header, so maybe we need to add/update it to match the latest draft.
But in our code i see the following value for
Feature-Policy, i think that if you copy that, it should work.Also see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
Which states the same markup as in the code above instead of using
=()as values.