# CROS Access-Control-Allow-Origin

**URL:** <https://community.shiphero.com/t/cros-access-control-allow-origin/1165>\
**Category:** Getting Started\
**Created:** [March 5, 2021, 9:29pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165 "2021-03-05T21:29:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![myousry](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@myousry](https://community.shiphero.com/u/myousry)\
**Post date:** [March 5, 2021, 9:29pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/1 "2021-03-05T21:29:20Z")

</div>

I tried to consume graphQL like the example provided in the [documentation](https://developer.shiphero.com/graphql-primer/#consumingapi) using java script but i got cros origin error

 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/7344e537a4f826dd61639810d710e8091ab38070.png)

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [March 6, 2021, 2:23pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/2 "2021-03-06T14:23:29Z")

</div>

Hi @myousry!

Have you tried using Apollo?  
I haven’t tried it yet to be honest, but I found this article that looks interesting

> **[4 Simple Ways to Call a GraphQL API](https://www.apollographql.com/blog/4-simple-ways-to-call-a-graphql-api-a6807bcdb355/)**
>
> On this blog, we spend a lot of time pushing the limits of GraphQL and talking about some of the most advanced parts of the technology. However, GraphQL is inherently quite simple, and works just fine without any specialized tooling. So let’s...

Thanks for catching that! We will be reviewing our documentation

Let us know if that doesn’t work for you  
Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![myousry](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@myousry](https://community.shiphero.com/u/myousry)\
**Post date:** [March 6, 2021, 3:08pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/3 "2021-03-06T15:08:23Z")

</div>

Hello @tomasw ,

Thanks for your reply, but i am able to call most shiphero graphQl queries and mutatios using a proxy server [GitHub - Rob--W/cors-anywhere: CORS Anywhere is a NodeJS reverse proxy which adds CORS headers to the proxied request.](https://github.com/Rob--W/cors-anywhere) to call graphQl endpoint and i think it is not the optimal solution so i am asking i there another solution that i can follow instead of calling proxy server from javascript client code, i have followed the same steps in the documentation passing authorization in the header … but i got cros error but this error disappeared when i used a proxy server

could you please return from your side in every response header

```auto
    res.setHeader('Access-Control-Allow-Origin', '*');

    // Request methods you wish to allow
    res.setHeader('Access-Control-Allow-Methods', '*');

    // Request headers you wish to allow
    res.setHeader('Access-Control-Allow-Headers', '*');

```

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [March 30, 2021, 5:30pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/4 "2021-03-30T17:30:49Z")

</div>

Hi @myousry!  
I apologize for the delayed response about this. We will engage our engineering team to see if we can figure this out and try to provide a better solution for this.  
Thanks again for the patience!  
Tom

---

<div class="post-metadata">

**Author:** ![myousry](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@myousry](https://community.shiphero.com/u/myousry)\
**Post date:** [April 19, 2021, 3:32am UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/6 "2021-04-19T03:32:19Z")

</div>

Hi @tomasw  
I am following up with you regarding the above issue.

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [April 26, 2021, 7:54pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/7 "2021-04-26T19:54:16Z")

</div>

Hi @myousry!  
My apologies for the delayed response about this.  
Unfortunately, we haven’t been able to reproduce this, but when we check the headers for the Queries we do notice that the header is present so it should be already available:

 ![Screen Shot 2021-04-26 at 16.49.41](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/8ef5256db742af9ff04288d03e7ff1d5c47d86fd.png)

That screenshot is consuming the Public API using [Altair](https://altair.sirmuel.design/)  
Let me know if that still doesn’t help!  
Thank again!  
Tom

---

<div class="post-metadata">

**Author:** ![myousry](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@myousry](https://community.shiphero.com/u/myousry)\
**Post date:** [August 6, 2021, 2:04pm UTC](https://community.shiphero.com/t/cros-access-control-allow-origin/1165/8 "2021-08-06T14:04:54Z")

</div>

can you please check this issue that what I am talking about [Learn CORS In 6 Minutes - YouTube](https://www.youtube.com/watch?v=PNtFSVU-YTI)

I need shiphero server in response header to return this attribute with \* value  
access-control-allow-origin: \*
