Highlighted
Commodore
Commodore
162 views

RUM Client Monitor Probe CORS Settings for same origin policy

Jump to solution

Hello

 

For the RUM Browser Probe or RUM Client Monitor probe, I added the javascript snippet to a web application, but for some reason I get an error that appears when the POST message with the data is sent to the probe:

 

XMLHttpRequest cannot load http://PROBE_URL:8080/hpclientmon/data. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://APP_URL' is therefore not allowed access.

 

How do I handle this?
I added the header Access-Control-Allow_origin "*" to the applicatoin I am instrumenting but it does not work, do I need to add it to the RUM Client Probe? how?

 

I opened a ticket with HP but we have not been able to figure it out

 

Thanks!

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Commodore
Commodore

Jose,

 

It appears that if you configure the right filter in the BSM RUM Configuration, the error does not appear.

There is no need to add the header on the target page. I tested it myself and it works.

 

Regards,

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Contributor
Micro Focus Contributor

Hello SergioB,

 

This error is commonly becuase the cross domain request that's trying to take place. You mention you used the "*" for the header: Access-Control-Allow_origin "*" , but have you tried using the exact domain you require?

 

Similar to:        header ('Access-Control-Allow-Origin: http://mysite1.com') ;

 

This way it will also be safer. Let me know if this is usefull.

 

Regards,

Jose

Regards,
Jose
0 Likes
Highlighted
Commodore
Commodore

Jose,

 

It appears that if you configure the right filter in the BSM RUM Configuration, the error does not appear.

There is no need to add the header on the target page. I tested it myself and it works.

 

Regards,

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.