{"category":"web","endpoint":"https://setget.net/v1/tools/http-headers-parse","examples":[{"input":{"text":"HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"},"output":{"audit":null,"count":2,"explained":{"cache-control":{"directives":[{"meaning":"The response is fresh for 10 minutes. Caches may reuse it without asking the server during that time.","name":"max-age","value":600}],"meaning":"How browsers and shared caches may store and reuse the response.","summary":"Browsers may reuse it for 10 minutes without contacting the server; shared caches such as CDNs may reuse it for 10 minutes.","warnings":[]},"content-type":{"boundary":null,"charset":"utf-8","meaning":"The format of the body, and for text its character set.","media_type":"text/html"}},"headers":{"cache-control":"max-age=600","content-type":"text/html; charset=UTF-8"},"skipped":[],"start_line":{"reason":"OK","status":200,"type":"response","version":"1.1"}}},{"input":{"audit":true,"text":"x-frame-options: DENY\nx-content-type-options: nosniff\nreferrer-policy: no-referrer"},"output":{"audit":{"missing":[{"header":"Strict-Transport-Security","why":"Tells browsers to use HTTPS only. Without it a visit can be downgraded to plain HTTP."},{"header":"Content-Security-Policy","why":"Limits where scripts and other resources may load from, which contains injected code."},{"header":"Permissions-Policy","why":"Switches off browser features the page does not need, such as camera or location."}],"present":["X-Content-Type-Options","X-Frame-Options","Referrer-Policy"]},"count":3,"explained":{"referrer-policy":{"meaning":"How much of the page address is sent to other sites in the Referer header."},"x-content-type-options":{"meaning":"With \"nosniff\", browsers do not guess a different content type."},"x-frame-options":{"meaning":"Whether other sites may show this page inside a frame."}},"headers":{"referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-frame-options":"DENY"},"skipped":[],"start_line":null},"title":"Security header audit"}],"input_schema":{"additionalProperties":false,"properties":{"audit":{"default":false,"description":"List common security headers that are missing.","type":"boolean"},"text":{"description":"The raw headers, as copied from curl -i or the browser developer tools.","examples":["HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"],"type":"string"}},"required":["text"],"type":"object"},"keywords":["http headers","parse headers","response headers","security headers","hsts","csp","curl -i","content-type","cors"],"related":["cache-control-explain","cookie-parse","http-status","curl-to-json"],"slug":"http-headers-parse","summary":"Turn a raw block of HTTP headers into JSON, explain the well-known ones and audit security headers.","tier":"inline","title":"HTTP headers parser","url":"https://setget.net/tools/http-headers-parse"}
