---
title: "Comment by Dheeraj Mahra on \"Web Security: Cross-Origin Resource Sharing (CORS)\" | Hashnode"
description: "I faced one issue related to cors some days back. When hitting an api with axios, I was getting &lt;No Access-Control-Allow-Origin&gt; header present on the ser"
url: "https://hashnode.com/posts/web-security-cross-origin-resource-sharing-cors/60966d8221068818a5c6108a/comment/6098c2c61ea29f2c341e2089"
---

[Discussion](https://hashnode.com/posts/web-security-cross-origin-resource-sharing-cors/60966d8221068818a5c6108a)

Comment [Web Security: Cross-Origin Resource Sharing (CORS)](https://hashnode.com/posts/web-security-cross-origin-resource-sharing-cors/60966d8221068818a5c6108a)

[Dheeraj Mahra](https://hashnode.com/@dheerajmahra)

[May 10, 2021](https://hashnode.com/posts/web-security-cross-origin-resource-sharing-cors/60966d8221068818a5c6108a/comment/6098c2c61ea29f2c341e2089)

I faced one issue related to cors some days back. When hitting an api with axios, I was getting <No Access-Control-Allow-Origin> header present on the server but I was able to make a successful call when hitting it with anchor tag. Any idea why??

[Sumanth S](https://hashnode.com/@SumanthS)

[May 10, 2021](https://hashnode.com/posts/web-security-cross-origin-resource-sharing-cors/60966d8221068818a5c6108a/comment/6098c2c61ea29f2c341e2089#reply-6098e8ed21068818a5c63a7c)

Update: Access-Control-Allow-Origin is a response header - so in order to enable CORS - you need to add this header to the response from your server.

headers: {"Access-Control-Allow-Origin": "\*"}

kindly add the above line, check it once

[Dheeraj Mahra](https://hashnode.com/@dheerajmahra)

[May 10, 2021](https://hashnode.com/posts/web-security-cross-origin-resource-sharing-cors/60966d8221068818a5c6108a/comment/6098c2c61ea29f2c341e2089#reply-6098ea0f21068818a5c63a89)

[Sumanth S](https://hashnode.com/@SumanthS) Yes I know tthe point that this header is required to enable CORS. But, It is a third party api and they have not added this header I guess. But how am I able to access it with anchor tag then??
