Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

API gateway between Website (php) and SAP : CORS Policy error or "Exceeded Timeout 504"

0 Kudos

Hi everybody!

I'm developping a e-commerce webapp for my client, using Nuxt.js (js) for the Front and Laravel for the back (PHP).

I'm trying to communicate with SAP (get products, send command, get order status), using classic PHP.

In local development, everything works perfectly : login to SAP, and the different actions mentioned above.

Unfortunately, in production, all calls requiring the SAP api return an error.

Access to XMLHttpRequest at 'https://[' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

When i'm calling SAP directly from BACK, i have a connection timed out.

Curl error: Failed to connect to port 50000: Connection timed out

I can't figure out if the problem is with me or with SAP. I don't have my hands on SAP (whitelist ? Allowed domain ?).

Someone can help me please?
I don't have any solution 😞

  • SAP Managed Tags:

Former Member

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with:, as it provides tips for preparing questions that draw responses from our members.

For example, you can:

- outline what steps you took to find answers (and why they weren't helpful)

- share screenshots of what you've seen/done

- make sure you've applied the appropriate tags

- use a more descriptive subject line

The more details you provide, the more likely it is that members will be able to respond. Feel free to also take our Q&A tutorial at:

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond:

  • SAP Managed Tags: