PageSourceSearch

https://http-response-headers-for-web-security.vercel.app/assets/slidev/39-DrC0Pu5C.js

js http-response-headers-for-web-security.vercel.app collected 2026-10-03 07:06:02 UTC 3,366 bytes, 10 lines download raw bytes

1import{_ as c}from"./Transform-q0bKtNAW.js";import{_ as p}from"./CodeBlockWrapper-DSfbfJ_t.js";import{o as d,c as h,k as a,l as t,m as n,q as m,s as u,A as i,e,a0 as s}from"../modules/vue-BtHYivh2.js";import{I as f}from"./default-57DdQTDm.js";import{b as _,aq as o}from"../index-BCDgqxOF.js";import{p as g,u as k,f as b}from"./context-BhHPiAu-.js";import"../modules/unplugin-icons-DpLipKoU.js";import"../modules/shiki-DTyLykCM.js";const v=e("h1",null,"Permissions-Policy (prev. Feature-Policy)",-1),y=e("p",null,[s("Permissions Policy allows the developer to control the "),e("span",{class:"color:accent"},"browser features"),s(" available to a page, its iframes, and subresources, by declaring a set of policies for the browser to enforce.")],-1),P=e("p",null,"Example: Instagram",-1),w=e("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[e("code",{class:"language-txt"},[e("span",{class:"line"},[e("span",null,"Permissions-Policy:")]),s(`
2`),e("span",{class:"line"},[e("span",null,"  accelerometer=(self), attribution-reporting=(), autoplay=(),bluetooth=(), camera=(self),")
2]),s(`
3`),e("span",{class:"line"},[e("span",null,"  ch-device-memory=(), ch-downlink=(), ch-ect=(), ch-rtt=(), ch-save-data=(), ch-ua-arch=(), ch-ua-bitness=(),")]),s(`
4`),e("span",{class:"line"},[e("span",null,"  clipboard-read=(), clipboard-write=(self), display-capture=(),encrypted-media=(), fullscreen=(self),")]),s(`
5`),e("span",{class:"line"},[e("span",null,"  gamepad=(), geolocation=(self), gyroscope=(self), hid=(), idle-detection=(), keyboard-map=(), local-fonts=(),")]),s(`
6`),e("span",{class:"line"},[e("span",null,"  magnetometer=(), microphone=(self), midi=(), otp-credentials=(), payment=(), picture-in-picture=(self),")]),s(`
7`),e("span",{class:"line"},[e("span",null,"  publickey-credentials-get=(), screen-wake-lock=(), serial=(), usb=(), window-management=(), xr-spatial-tracking=();")]),s(`
8`),e("span",{class:"line"},[e("span",null,'  report-to="permissions_policy"')])])],-1),C=e("p",null,[s("Those "),e("code",null,"ch-*"),s(" are directives for "),e("a",{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints",target:"_blank",rel:"noopener"},"HTTP client hints"),s(".")],-1),x=e("p",null,[s("A server sends the "),e("code",null,"Accept-CH"),s(" header to specify the client hints that it is interested in receiving.")],-1),H=e("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[e("code",{class:"language-txt"},[e("span",{class:"line"},[e("span",null,"Accept-CH:")]),s(`
9`),e("span",{class:"line"},[e("span",null,"  viewport-width,dpr,")]),s(`
10`),e("span",{class:"line"},[e("span",null,"  Sec-CH-Prefers-Color-Scheme,Sec-CH-UA-Full-Version-List,Sec-CH-UA-Platform-Version,Sec-CH-UA-Model")])])],-1),T={__name:"39",setup(A){return g(o),k(),(S,V)=>{const l=p,r=c;return d(),h(f,m(u(i(b)(i(o),38))),{default:a(()=>[v,t(r,{scale:"0.95"},{default:a(()=>[y,P,t(l,n({},{ranges:["all","3","8","all"]}),{default:a(()=>[w]),_:1},16),C,x,t(l,n({},{ranges:[]}),{default:a(()=>[H]),_:1},16)]),_:1})]),_:1},16)}}},W=_(T,[["__file","/@slidev/slides/39.md"]]);export{W as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.