|
@@ -0,0 +1,60 @@
|
|
|
+package permissionpolicy
|
|
|
+
|
|
|
+import "net/http"
|
|
|
+
|
|
|
+/*
|
|
|
+ Permisson Policy
|
|
|
+
|
|
|
+ This is a permission policy header modifier that changes
|
|
|
+ the request permission related policy fields
|
|
|
+*/
|
|
|
+
|
|
|
+type PermissionsPolicy struct {
|
|
|
+ Accelerometer []string `json:"accelerometer"`
|
|
|
+ AmbientLightSensor []string `json:"ambient_light_sensor"`
|
|
|
+ Autoplay []string `json:"autoplay"`
|
|
|
+ Battery []string `json:"battery"`
|
|
|
+ Camera []string `json:"camera"`
|
|
|
+ CrossOriginIsolated []string `json:"cross_origin_isolated"`
|
|
|
+ DisplayCapture []string `json:"display_capture"`
|
|
|
+ DocumentDomain []string `json:"document_domain"`
|
|
|
+ EncryptedMedia []string `json:"encrypted_media"`
|
|
|
+ ExecutionWhileNotRendered []string `json:"execution_while_not_rendered"`
|
|
|
+ ExecutionWhileOutOfView []string `json:"execution_while_out_of_viewport"`
|
|
|
+ Fullscreen []string `json:"fullscreen"`
|
|
|
+ Geolocation []string `json:"geolocation"`
|
|
|
+ Gyroscope []string `json:"gyroscope"`
|
|
|
+ KeyboardMap []string `json:"keyboard_map"`
|
|
|
+ Magnetometer []string `json:"magnetometer"`
|
|
|
+ Microphone []string `json:"microphone"`
|
|
|
+ Midi []string `json:"midi"`
|
|
|
+ NavigationOverride []string `json:"navigation_override"`
|
|
|
+ Payment []string `json:"payment"`
|
|
|
+ PictureInPicture []string `json:"picture_in_picture"`
|
|
|
+ PublicKeyCredentialsGet []string `json:"publickey_credentials_get"`
|
|
|
+ ScreenWakeLock []string `json:"screen_wake_lock"`
|
|
|
+ SyncXHR []string `json:"sync_xhr"`
|
|
|
+ USB []string `json:"usb"`
|
|
|
+ WebShare []string `json:"web_share"`
|
|
|
+ XRSpatialTracking []string `json:"xr_spatial_tracking"`
|
|
|
+ ClipboardRead []string `json:"clipboard_read"`
|
|
|
+ ClipboardWrite []string `json:"clipboard_write"`
|
|
|
+ Gamepad []string `json:"gamepad"`
|
|
|
+ SpeakerSelection []string `json:"speaker_selection"`
|
|
|
+ ConversionMeasurement []string `json:"conversion_measurement"`
|
|
|
+ FocusWithoutUserActivation []string `json:"focus_without_user_activation"`
|
|
|
+ HID []string `json:"hid"`
|
|
|
+ IdleDetection []string `json:"idle_detection"`
|
|
|
+ InterestCohort []string `json:"interest_cohort"`
|
|
|
+ Serial []string `json:"serial"`
|
|
|
+ SyncScript []string `json:"sync_script"`
|
|
|
+ TrustTokenRedemption []string `json:"trust_token_redemption"`
|
|
|
+ Unload []string `json:"unload"`
|
|
|
+ WindowPlacement []string `json:"window_placement"`
|
|
|
+ VerticalScroll []string `json:"vertical_scroll"`
|
|
|
+}
|
|
|
+
|
|
|
+func InjectSecurePolicyHeader(w http.ResponseWriter, r *http.Request) {
|
|
|
+
|
|
|
+ //w.Header()
|
|
|
+}
|