<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amit Jangid</title>
    <description>The latest articles on DEV Community by Amit Jangid (@amit-jangid).</description>
    <link>https://dev.to/amit-jangid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4132381%2F29958307-39bd-4f04-992b-802c8a075ec9.jpg</url>
      <title>DEV Community: Amit Jangid</title>
      <link>https://dev.to/amit-jangid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amit-jangid"/>
    <language>en</language>
    <item>
      <title>Securing an Angular Application: Part 3 — Implementing CSP with Nginx</title>
      <dc:creator>Amit Jangid</dc:creator>
      <pubDate>Mon, 05 Oct 2026 11:12:27 +0000</pubDate>
      <link>https://dev.to/amit-jangid/securing-an-angular-application-part-3-implementing-csp-with-nginx-5hb7</link>
      <guid>https://dev.to/amit-jangid/securing-an-angular-application-part-3-implementing-csp-with-nginx-5hb7</guid>
      <description>&lt;p&gt;Continuing my series on &lt;strong&gt;hardening Angular applications&lt;/strong&gt;, Part 3 moves into the actual &lt;strong&gt;Nginx server configuration and Content Security Policy (CSP)&lt;/strong&gt; implementation.&lt;/p&gt;

&lt;p&gt;In this part, I walk through the &lt;code&gt;docker-nginx-server.conf&lt;/code&gt; configuration used to serve a real Angular application and explain how the different pieces work together.&lt;/p&gt;

&lt;p&gt;Some of the topics covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚙️ Angular server configuration with Nginx&lt;/li&gt;
&lt;li&gt;🔀 Angular SPA routing&lt;/li&gt;
&lt;li&gt;📦 Static asset handling and caching&lt;/li&gt;
&lt;li&gt;🚫 Blocking hidden and sensitive files&lt;/li&gt;
&lt;li&gt;🔐 Security headers&lt;/li&gt;
&lt;li&gt;🛡️ Content Security Policy directives&lt;/li&gt;
&lt;li&gt;🔑 Dynamic CSP nonce handling&lt;/li&gt;
&lt;li&gt;🧩 Injecting the nonce into Angular HTML&lt;/li&gt;
&lt;li&gt;⚠️ Error page handling&lt;/li&gt;
&lt;li&gt;🔒 Trusted Types and other CSP protections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rather than using a generic CSP policy, the goal is to understand &lt;strong&gt;which resources the Angular application actually needs and how those requirements translate into individual CSP directives&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This part also shows how the CSP nonce is handled using Nginx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="nv"&gt;$csp_nonce&lt;/span&gt; &lt;span class="nv"&gt;$request_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;sub_filter_once&lt;/span&gt; &lt;span class="no"&gt;off&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;sub_filter&lt;/span&gt; &lt;span class="s"&gt;'__CSP_NONCE__'&lt;/span&gt; &lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="nv"&gt;$csp_nonce&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows the nonce used by the CSP policy to be injected into the Angular application's HTML for each request.&lt;br&gt;
With the Nginx configuration and CSP in place, the next part moves one layer deeper into the deployment process: Dockerizing the Angular application and packaging the Nginx configuration into a production-ready container.&lt;/p&gt;

&lt;p&gt;📖 Read Part 3:&lt;br&gt;
&lt;a href="https://medium.com/@jangidamit800/angular-content-security-policy-csp-implementing-the-nginx-server-configuration-c70593b9136a?sharedUserId=jangidamit800" rel="noopener noreferrer"&gt;https://medium.com/@jangidamit800/angular-content-security-policy-csp-implementing-the-nginx-server-configuration-c70593b9136a?sharedUserId=jangidamit800&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;#Angular #AngularSecurity #CSP #ContentSecurityPolicy #Nginx #WebSecurity #DevSecOps #Docker #FrontendSecurity&lt;/p&gt;

</description>
      <category>angular</category>
      <category>nginx</category>
      <category>docker</category>
      <category>security</category>
    </item>
    <item>
      <title>Securing an Angular Application: Part 2 — Preparing the Nginx Layer</title>
      <dc:creator>Amit Jangid</dc:creator>
      <pubDate>Wed, 30 Sep 2026 04:55:45 +0000</pubDate>
      <link>https://dev.to/amit-jangid/securing-an-angular-application-part-2-preparing-the-nginx-layer-g02</link>
      <guid>https://dev.to/amit-jangid/securing-an-angular-application-part-2-preparing-the-nginx-layer-g02</guid>
      <description>&lt;p&gt;Continuing my series on &lt;strong&gt;hardening Angular applications&lt;/strong&gt;, Part 2 moves from browser security concepts into the server layer.&lt;/p&gt;

&lt;p&gt;In this part, I focus on the &lt;strong&gt;Nginx configuration used to serve an Angular application&lt;/strong&gt; and build the foundation required before introducing Content Security Policy (CSP).&lt;/p&gt;

&lt;p&gt;Some of the topics covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚙️ Nginx configuration basics&lt;/li&gt;
&lt;li&gt;📦 Serving Angular static assets&lt;/li&gt;
&lt;li&gt;🗜️ Gzip compression&lt;/li&gt;
&lt;li&gt;💾 Static asset caching&lt;/li&gt;
&lt;li&gt;🔀 Angular SPA routing&lt;/li&gt;
&lt;li&gt;🚫 Restricting access to sensitive files&lt;/li&gt;
&lt;li&gt;⚠️ Error page handling&lt;/li&gt;
&lt;li&gt;🔧 Preparing the Nginx layer for CSP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is to understand &lt;strong&gt;why each configuration exists&lt;/strong&gt; rather than simply copying an Nginx configuration from somewhere else.&lt;/p&gt;

&lt;p&gt;This part establishes the Nginx foundation. In the next part, I'll move into the actual &lt;strong&gt;Angular server configuration and CSP implementation&lt;/strong&gt;, including how the policy is built around the application's resource requirements.&lt;/p&gt;

&lt;p&gt;📖 &lt;strong&gt;Read Part 2:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://medium.com/@jangidamit800/angular-csp-configuring-content-security-policy-with-nginx" rel="noopener noreferrer"&gt;https://medium.com/@jangidamit800/angular-csp-configuring-content-security-policy-with-nginx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;#Angular #AngularSecurity #Nginx #CSP #WebSecurity #DevSecOps #FrontendSecurity #Docker&lt;/p&gt;

</description>
      <category>angular</category>
      <category>nginx</category>
      <category>docker</category>
      <category>security</category>
    </item>
    <item>
      <title>Angular Security Headers: A Practical Guide to Securing Your Angular Application</title>
      <dc:creator>Amit Jangid</dc:creator>
      <pubDate>Wed, 23 Sep 2026 04:29:01 +0000</pubDate>
      <link>https://dev.to/amit-jangid/angular-security-headers-a-practical-guide-to-securing-your-angular-application-g4i</link>
      <guid>https://dev.to/amit-jangid/angular-security-headers-a-practical-guide-to-securing-your-angular-application-g4i</guid>
      <description>&lt;p&gt;I've started a new series focused on &lt;strong&gt;hardening Angular applications using browser and HTTP security controls&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In Part 1, I cover the fundamentals of security headers and how they add another layer of protection between an Angular application and the browser.&lt;/p&gt;

&lt;p&gt;Some of the topics covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔒 HSTS — enforcing HTTPS&lt;/li&gt;
&lt;li&gt;🛡️ X-Content-Type-Options&lt;/li&gt;
&lt;li&gt;🧭 Referrer-Policy&lt;/li&gt;
&lt;li&gt;🎯 Permissions-Policy&lt;/li&gt;
&lt;li&gt;🚫 X-Frame-Options&lt;/li&gt;
&lt;li&gt;🔄 Cross-Origin Opener Policy (COOP)&lt;/li&gt;
&lt;li&gt;🌐 Cross-Origin Resource Policy (CORP)&lt;/li&gt;
&lt;li&gt;🔐 Content Security Policy (CSP)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal of this series isn't to simply copy a list of security headers, but to understand &lt;strong&gt;what each header does, what problem it addresses, and how these controls fit into a real Angular deployment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is Part 1, where we establish the foundation. The upcoming parts will move into the actual &lt;strong&gt;CSP, Nginx, and Docker configuration&lt;/strong&gt; used to serve the application.&lt;/p&gt;

&lt;p&gt;📖 &lt;strong&gt;Read Part 1:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://medium.com/@jangidamit800/hardening-an-angular-application-understanding-security-headers-0c65644b981b" rel="noopener noreferrer"&gt;https://medium.com/@jangidamit800/hardening-an-angular-application-understanding-security-headers-0c65644b981b&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love to hear how others approach security hardening for Angular applications.&lt;/p&gt;

&lt;p&gt;#Angular #AngularSecurity #WebSecurity #CSP #Nginx #DevSecOps #FrontendSecurity #WebDevelopment&lt;/p&gt;

</description>
      <category>angular</category>
      <category>nginx</category>
      <category>docker</category>
      <category>security</category>
    </item>
  </channel>
</rss>
