{"id":1976,"date":"2025-05-21T09:56:21","date_gmt":"2025-05-21T07:56:21","guid":{"rendered":"https:\/\/www.dimension-internet.com\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/"},"modified":"2025-07-02T14:52:36","modified_gmt":"2025-07-02T12:52:36","slug":"feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy","status":"publish","type":"post","link":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/","title":{"rendered":"Feature Policy: Control access to browser APIs to strengthen security and privacy"},"content":{"rendered":"\n<p>The <span style=\"background-color: #e0e0e0;\">Feature-Policy<\/span> HTTP header (now renamed Permissions-Policy) gives you granular control over browser APIs (geolocation, camera, microphone, payment, fullscreen, etc.). By limiting or disabling these features, you reduce the attack surface and protect your visitors&#8217; privacy. <\/p>\n<h2>What is the Feature-Policy \/ Permissions-Policy header?<\/h2>\n<p>Specified by the W3C, this header defines, through a series of directives, which APIs are allowed, restricted, or prohibited for your domain and its subresources.<\/p>\n<h2>Why implement?<\/h2>\n<ul>\n<li>Strengthen <strong>security<\/strong> by blocking unnecessary APIs.<\/li>\n<li>Improve <strong>privacy<\/strong> by disabling sensors on non-critical pages.<\/li>\n<li>Mitigate <strong>drive-by attacks<\/strong> where a malicious script could activate an API.<\/li>\n<li>Apply the <strong>principle of least privilege<\/strong>.<\/li>\n<\/ul>\n<h2>Key Guidelines and Examples<\/h2>\n<ul>\n<li><span style=\"background-color: #e0e0e0;\">geolocation &#8216;self&#8217;<\/span>: geolocation only on your domain.<\/li>\n<li><span style=\"background-color: #e0e0e0;\">camera &#8216;none&#8217;<\/span>: camera access prohibited.<\/li>\n<li><span style=\"background-color: #e0e0e0;\">microphone &#8216;none&#8217;<\/span>: microphone access denied.<\/li>\n<li><span style=\"background-color: #e0e0e0;\">payment &#8216;self&#8217;<\/span>: Payment API on your domain.<\/li>\n<li><span style=\"background-color: #e0e0e0;\">fullscreen *<\/span>: fullscreen allowed everywhere.<\/li>\n<\/ul>\n<p>Strict example in Feature-Policy:<\/p>\n<p><code>Feature-Policy: geolocation 'self'; camera 'none'; microphone 'none'; payment 'self'; fullscreen *<\/code><\/p>\n<p>New Permissions-Policy syntax:<\/p>\n<p><code>Permissions-Policy: geolocation=(self), camera=(), microphone=(), payment=(self), fullscreen=*<\/code><\/p>\n<h2>Deployment Steps<\/h2>\n<ol>\n<li><strong>Audit<\/strong> of your API usage.<\/li>\n<li><em>Report-only<\/em> reporting to collect violations.<\/li>\n<li>Adjust until no alerts.<\/li>\n<li>Switching to blocking mode in production.<\/li>\n<li>Continuous monitoring via logs and updates.<\/li>\n<\/ol>\n<h2>Configuration examples<\/h2>\n<h3>Nginx<\/h3>\n<p><code>add_header Permissions-Policy \"geolocation=(self), camera=(), microphone=(), payment=(self), fullscreen=*\" always;<\/code><\/p>\n<h3>Apache (.htaccess)<\/h3>\n<p><code>&lt;IfModule mod_headers.c&gt;<br\/>\n  Header always set Permissions-Policy \"geolocation=(self), camera=(), microphone=(), payment=(self), fullscreen=*\"<br\/>\n&lt;\/IfModule&gt;<\/code><\/p>\n<h3>WordPress (functions.php)<\/h3>\n<pre>add_action('send_headers', function(){\n  header(\"Permissions-Policy: geolocation=(self), camera=(), microphone=(), payment=(self), fullscreen=*\");\n});<\/pre>\n<h2>Our implementation services<\/h2>\n<p>At <strong>Dimension Internet<\/strong>, we carry out:<\/p>\n<ul>\n<li>auditing your API usage,<\/li>\n<li>the definition and deployment of the policy in report-only then in blocking mode,<\/li>\n<li>pre-production testing,<\/li>\n<li>continuous monitoring and updates.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>The <span style=\"background-color: #e0e0e0;\">Feature-Policy<\/span> (or Permissions-Policy) header is a powerful tool for locking down browser APIs, reducing the attack surface, and preserving user privacy. Dimension Internet supports you from the initial audit to maintenance for optimal deployment. <\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>The <code>Feature-Policy<\/code> HTTP header (now renamed <code>Permissions-Policy<\/code>) gives you granular control over browser APIs (geolocation, camera, microphone, payment, fullscreen, etc.). By limiting or disabling these features, you reduce the attack surface and protect your visitors&#8217; privacy. <\/p>\n","protected":false},"author":1,"featured_media":1796,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,38],"tags":[],"class_list":["post-1976","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Feature Policy: Control access to browser APIs to strengthen security and privacy - Dimension Internet<\/title>\n<meta name=\"description\" content=\"Learn how the Feature-Policy (now Permissions-Policy) HTTP header allows you to restrict access to browser features and APIs, improve user privacy, and strengthen your site&#039;s security. Dimension Internet can help you implement it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Feature Policy: Control access to browser APIs to strengthen security and privacy - Dimension Internet\" \/>\n<meta property=\"og:description\" content=\"Learn how the Feature-Policy (now Permissions-Policy) HTTP header allows you to restrict access to browser features and APIs, improve user privacy, and strengthen your site&#039;s security. Dimension Internet can help you implement it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/\" \/>\n<meta property=\"og:site_name\" content=\"Dimension Internet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dimensioninternet\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-21T07:56:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-02T12:52:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dimension-internet.com\/wp-content\/uploads\/2025\/05\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2368\" \/>\n\t<meta property=\"og:image:height\" content=\"1792\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sven CAILTEUX\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sven CAILTEUX\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/\"},\"author\":{\"name\":\"Sven CAILTEUX\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/#\\\/schema\\\/person\\\/7486d6af116e6486d140e27c9e04f7a7\"},\"headline\":\"Feature Policy: Control access to browser APIs to strengthen security and privacy\",\"datePublished\":\"2025-05-21T07:56:21+00:00\",\"dateModified\":\"2025-07-02T12:52:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/\"},\"wordCount\":256,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dimension-internet.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg\",\"articleSection\":[\"Development\",\"Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/\",\"url\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/\",\"name\":\"Feature Policy: Control access to browser APIs to strengthen security and privacy - Dimension Internet\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dimension-internet.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg\",\"datePublished\":\"2025-05-21T07:56:21+00:00\",\"dateModified\":\"2025-07-02T12:52:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/#\\\/schema\\\/person\\\/7486d6af116e6486d140e27c9e04f7a7\"},\"description\":\"Learn how the Feature-Policy (now Permissions-Policy) HTTP header allows you to restrict access to browser features and APIs, improve user privacy, and strengthen your site's security. Dimension Internet can help you implement it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dimension-internet.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dimension-internet.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg\",\"width\":2368,\"height\":1792},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Feature Policy: Control access to browser APIs to strengthen security and privacy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/\",\"name\":\"Dimension Internet\",\"description\":\"Graphic Arts Professional and Internet-related technologies\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dimension-internet.com\\\/en\\\/#\\\/schema\\\/person\\\/7486d6af116e6486d140e27c9e04f7a7\",\"name\":\"Sven CAILTEUX\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Feature Policy: Control access to browser APIs to strengthen security and privacy - Dimension Internet","description":"Learn how the Feature-Policy (now Permissions-Policy) HTTP header allows you to restrict access to browser features and APIs, improve user privacy, and strengthen your site's security. Dimension Internet can help you implement it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/","og_locale":"en_US","og_type":"article","og_title":"Feature Policy: Control access to browser APIs to strengthen security and privacy - Dimension Internet","og_description":"Learn how the Feature-Policy (now Permissions-Policy) HTTP header allows you to restrict access to browser features and APIs, improve user privacy, and strengthen your site's security. Dimension Internet can help you implement it.","og_url":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/","og_site_name":"Dimension Internet","article_publisher":"https:\/\/www.facebook.com\/dimensioninternet\/","article_published_time":"2025-05-21T07:56:21+00:00","article_modified_time":"2025-07-02T12:52:36+00:00","og_image":[{"width":2368,"height":1792,"url":"https:\/\/www.dimension-internet.com\/wp-content\/uploads\/2025\/05\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg","type":"image\/jpeg"}],"author":"Sven CAILTEUX","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sven CAILTEUX","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#article","isPartOf":{"@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/"},"author":{"name":"Sven CAILTEUX","@id":"https:\/\/www.dimension-internet.com\/en\/#\/schema\/person\/7486d6af116e6486d140e27c9e04f7a7"},"headline":"Feature Policy: Control access to browser APIs to strengthen security and privacy","datePublished":"2025-05-21T07:56:21+00:00","dateModified":"2025-07-02T12:52:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/"},"wordCount":256,"commentCount":0,"image":{"@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dimension-internet.com\/wp-content\/uploads\/2025\/05\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg","articleSection":["Development","Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/","url":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/","name":"Feature Policy: Control access to browser APIs to strengthen security and privacy - Dimension Internet","isPartOf":{"@id":"https:\/\/www.dimension-internet.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#primaryimage"},"image":{"@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dimension-internet.com\/wp-content\/uploads\/2025\/05\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg","datePublished":"2025-05-21T07:56:21+00:00","dateModified":"2025-07-02T12:52:36+00:00","author":{"@id":"https:\/\/www.dimension-internet.com\/en\/#\/schema\/person\/7486d6af116e6486d140e27c9e04f7a7"},"description":"Learn how the Feature-Policy (now Permissions-Policy) HTTP header allows you to restrict access to browser features and APIs, improve user privacy, and strengthen your site's security. Dimension Internet can help you implement it.","breadcrumb":{"@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#primaryimage","url":"https:\/\/www.dimension-internet.com\/wp-content\/uploads\/2025\/05\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg","contentUrl":"https:\/\/www.dimension-internet.com\/wp-content\/uploads\/2025\/05\/2562721c-4069-461d-a5e1-f61b28403043-2.jpg","width":2368,"height":1792},{"@type":"BreadcrumbList","@id":"https:\/\/www.dimension-internet.com\/en\/feature-policy-control-access-to-browser-apis-to-strengthen-security-and-privacy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dimension-internet.com\/en\/"},{"@type":"ListItem","position":2,"name":"Feature Policy: Control access to browser APIs to strengthen security and privacy"}]},{"@type":"WebSite","@id":"https:\/\/www.dimension-internet.com\/en\/#website","url":"https:\/\/www.dimension-internet.com\/en\/","name":"Dimension Internet","description":"Graphic Arts Professional and Internet-related technologies","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dimension-internet.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dimension-internet.com\/en\/#\/schema\/person\/7486d6af116e6486d140e27c9e04f7a7","name":"Sven CAILTEUX"}]}},"_links":{"self":[{"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/posts\/1976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/comments?post=1976"}],"version-history":[{"count":1,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/posts\/1976\/revisions"}],"predecessor-version":[{"id":1977,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/posts\/1976\/revisions\/1977"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/media\/1796"}],"wp:attachment":[{"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/media?parent=1976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/categories?post=1976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dimension-internet.com\/en\/wp-json\/wp\/v2\/tags?post=1976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}