# CORS with Instrumented Web Servers

**URL:** <https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869>\
**Category:** Dynatrace Managed\
**Tags:** dynatrace-managed, account-management, apache\
**Created:** [July 22, 2020, 11:45am UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869 "2020-07-22T11:45:38Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [July 22, 2020, 11:45am UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/1 "2020-07-22T11:45:38Z")

</div>

Dear All,

- Can we use the CORS even the webserver instrumented?
- Can we use the Cluster ActiveGate publically available URL for the CORS?

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![andrew\_knackste](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andrew_knackste/32/35964_2.png) [@andrew\_knackste](https://community.dynatrace.com/u/andrew_knackste)\
**Post date:** [July 22, 2020, 4:02pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/2 "2020-07-22T16:02:59Z")

</div>

Yes, you can use CORS requests to connect to Dynatrace even with instrumented webservers. That being said, if you are using automatic injection, CORS will not be involved as the requests are going back to the injected webserver.  
Cluster ActiveGate URLs should return a 200-ok response for CORS requests.

For more info, take a look at our doc [Agentless Monitoring](https://www.dynatrace.com/support/help/platform-modules/digital-experience/web-applications/troubleshooting/why-dont-i-see-my-applications-or-monitoring-data)

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [July 23, 2020, 9:12am UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/3 "2020-07-23T09:12:28Z")

</div>

Hello [@Andrew K.](https://answers.dynatrace.com/users/29952/view.html)

Thank you for your comments.

How am I going to verify the “Cluster ActiveGate URLs should return a 200-ok response for CORS requests.”?

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![andrew\_knackste](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andrew_knackste/32/35964_2.png) [@andrew\_knackste](https://community.dynatrace.com/u/andrew_knackste)\
**Post date:** [July 23, 2020, 12:14pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/4 "2020-07-23T12:14:25Z")

</div>

Feel free to use the Chrome Devtools network manager from a browser in the application’s target network zones. Ensure that the bf signals are returning a 200 status code.

 ![25853-screenshot-2020-07-23-081327.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/8/38c4900c7bd57ca041e3c42d66bf10281ce5996e.png)

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [July 25, 2020, 3:51pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/5 "2020-07-25T15:51:22Z")

</div>

Hello [@Andrew K.](https://answers.dynatrace.com/users/29952/view.html)

I made the changes to use the CORS instead of the instrumented web servers, but it did not work.

When I discussed the same subject with the Dynatrace support, and they said CORS supports only the Agentless monitoring.

Did you implement personally, the CORS with the auto instrumented web servers?

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![andrew\_knackste](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andrew_knackste/32/35964_2.png) [@andrew\_knackste](https://community.dynatrace.com/u/andrew_knackste)\
**Post date:** [July 27, 2020, 12:09pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/6 "2020-07-27T12:09:50Z")

</div>

Hi [@Babar Q.](https://answers.dynatrace.com/users/5357/view.html)

If you have automatic injection turned on, CORS will not apply as the HTTP requests are handled by the same servers that handle the HTML/dynamic requests.  
If you want to set-up an application to make requests that would involve CORS, then you will need to use agentless injection on your application.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [July 27, 2020, 5:14pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/7 "2020-07-27T17:14:29Z")

</div>

Hello [@Andrew K.](https://answers.dynatrace.com/users/29952/view.html)

Right. Itis the main challenge to use the agentless solution, whereas the automatic injection can be done easily.

If there was a way to simply stop the automatic JavaScript injection, and without manual configuration, the CORS could work.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![andrew\_knackste](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andrew_knackste/32/35964_2.png) [@andrew\_knackste](https://community.dynatrace.com/u/andrew_knackste)\
**Post date:** [July 28, 2020, 2:02pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/8 "2020-07-28T14:02:40Z")

</div>

If you are already using Automatic Injection, I don’t understand where CORS would be causing an issue. The requests should be sent back to the same servers that are handling the other HTTP requests.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [July 28, 2020, 3:34pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/9 "2020-07-28T15:34:35Z")

</div>

Hello @Andrew K.

I guess I could not explain my concerns in the last comments. Let me reiterate once again.

- If we stop the auto-injection, then we will have to manually insert the script in each HTML page to capture the load and XHR actions.
- My idea was just to stop the auto-injection and then send data to CORS without manual instrumentation of JavaScript.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![andrew\_knackste](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andrew_knackste/32/35964_2.png) [@andrew\_knackste](https://community.dynatrace.com/u/andrew_knackste)\
**Post date:** [July 28, 2020, 4:16pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/10 "2020-07-28T16:16:29Z")

</div>

Hi [@Babar Q.](https://answers.dynatrace.com/users/5357/view.html)

That makes sense. That may be the best configuration for this environment.

I still believe that using Automatic Injection should be preferred here, but I don’t know what the specific requirement you have around CORS would be.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [July 28, 2020, 4:32pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/11 "2020-07-28T16:32:50Z")

</div>

Hello @Andrew K.

The only objective is to remove the load of beacon data from the webserver.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![dave\_mauney](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dave_mauney/32/27784_2.png) [@dave\_mauney](https://community.dynatrace.com/u/dave_mauney)\
**Post date:** [July 28, 2020, 5:26pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/12 "2020-07-28T17:26:58Z")

</div>

I thought this was as simple as simply changing the beacon path to an absolute URL.

 ![25885-cors.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/48b9987172f4170fb340cac052088045d5bca188.png)

---

<div class="post-metadata">

**Author:** ![andrew\_knackste](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andrew_knackste/32/35964_2.png) [@andrew\_knackste](https://community.dynatrace.com/u/andrew_knackste)\
**Post date:** [July 28, 2020, 5:41pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/13 "2020-07-28T17:41:30Z")

</div>

I have to admit, this completely slipped my mind!

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [May 29, 2024, 2:51pm UTC](https://community.dynatrace.com/t/cors-with-instrumented-web-servers/19869/14 "2024-05-29T14:51:23Z")

</div>

I seek your help gurus, and may be this thread is relevant, I am having issues to use BizOps is this still working system and is it supported

[BizOpsConfigurator (dynatrace.github.io)](https://dynatrace.github.io/BizOpsConfigurator/#begin)

I get the following error even though I enter correctly the URL cloud instance and my token I created according to the pre requisite:

Browser blocked XHR call, check Browser Console (F12). Possible CORS failure on https (my cluster URL)

Any feedback is much appreciated.
