# Ajax request error reporting cross-domain

**URL:** <https://discourse.nodered.org/t/ajax-request-error-reporting-cross-domain/95914>\
**Category:** General\
**Tags:** http-request\
**Created:** [11 March 2025 07:19 UTC](https://discourse.nodered.org/t/ajax-request-error-reporting-cross-domain/95914 "2025-03-11T07:19:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SkyYxl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/skyyxl/32/99395_2.png) [@SkyYxl](https://discourse.nodered.org/u/SkyYxl)\
**Post date:** [11 March 2025 07:19 UTC](https://discourse.nodered.org/t/ajax-request-error-reporting-cross-domain/95914/1 "2025-03-11T07:19:40Z")

</div>

May I ask how to initiate ajax requests in the defined node? When I request, I always report cross-domain errors. The backend engineer also configured the cosr response header, but it still does not help

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 March 2025 09:51 UTC](https://discourse.nodered.org/t/ajax-request-error-reporting-cross-domain/95914/2 "2025-03-11T09:51:53Z")

</div>

By ajax I assume you just mean making a HTTP Request FROM Node-RED to an external HTTP Server (using the built in `http-request` node)?

If yes, then this is probably due to the external HTTP server CORS settings.

Check the server sends the correct `Access-Control-Allow-*` headers.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 May 2025 09:52 UTC](https://discourse.nodered.org/t/ajax-request-error-reporting-cross-domain/95914/3 "2025-05-10T09:52:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
