<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Content Security Policy on Nalar</title>
    <link>https://nalar.dev/tags/content-security-policy/</link>
    <description>Recent content in Content Security Policy on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 08 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/content-security-policy/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Use Content Security Policy as XSS Defense in Depth</title>
      <link>https://nalar.dev/use-content-security-policy-as-xss-defense-in-depth/</link>
      <pubDate>Tue, 08 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/use-content-security-policy-as-xss-defense-in-depth/</guid>
      <description>&lt;p&gt;A web application can carefully encode output and still acquire an injection bug later through a new template, a third-party component, or unsafe client-side code. If attacker-controlled text reaches a place where the browser interprets it as JavaScript, the result can be cross-site scripting (XSS): code runs in the security context of the application and can act with whatever authority the page already has.&lt;/p&gt;&#xA;&lt;p&gt;The primary fix is to stop untrusted data from becoming executable code. &lt;strong&gt;Content Security Policy (CSP)&lt;/strong&gt; adds a second boundary. The server sends a policy that tells the browser which scripts are allowed to execute. A well-designed policy can therefore reduce the impact of some XSS flaws even when the application accidentally places attacker-controlled markup into a page.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
