<?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: Anjaneyulu</title>
    <description>The latest articles on DEV Community by Anjaneyulu (@anji484).</description>
    <link>https://dev.to/anji484</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1404431%2Facf05fda-7618-4dec-9c08-2d504cf93a0b.png</url>
      <title>DEV Community: Anjaneyulu</title>
      <link>https://dev.to/anji484</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anji484"/>
    <language>en</language>
    <item>
      <title>A CSP-related issue in react application.</title>
      <dc:creator>Anjaneyulu</dc:creator>
      <pubDate>Wed, 03 Apr 2024 12:07:25 +0000</pubDate>
      <link>https://dev.to/anji484/a-csp-related-issue-in-react-application-4d8h</link>
      <guid>https://dev.to/anji484/a-csp-related-issue-in-react-application-4d8h</guid>
      <description>&lt;p&gt;Please look into the below steps that followed&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Created application using create-react-app&lt;/li&gt;
&lt;li&gt;For validating CSP used the ZAP tool, and got the below alerts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctj06hg6s2cqysfo28z7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctj06hg6s2cqysfo28z7.png" alt="Image description" width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above calls, we are not doing this from our application, it might be React Engine is calling these calls/API(s) internally.&lt;br&gt;
Added the below code in the app.js file&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj35shpln1bls0xpr2fl3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj35shpln1bls0xpr2fl3.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we tried to append a response header to resolve the above ZAP tool issues but in the console getting an error “Error: TypeError: Failed to execute 'set' on 'Headers': Headers are immutable.” in the above code while sending a request set the header tried to set the same headers in response&lt;/p&gt;

&lt;p&gt;Could you please anyone provide a solution to resolve this CSP-related issue?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Anjaneyulu.&lt;/p&gt;

</description>
      <category>react</category>
      <category>help</category>
    </item>
  </channel>
</rss>
