I'm using elastic cloud.
I am requesting assistance enabling Cross-Origin Resource Sharing (CORS) for http://localhost:8080 on our APM server.
how can I configure the APM server to allow requests from a test localhost instance?
We are currently developing and testing applications locally, and our frontend running on http://localhost:8080 needs to send data to the APM server. However, we are encountering CORS-related issues, as the APM server does not currently allow requests from this origin.
Hi @stephenb ,
Thank you for your feedback, I’ve reformulated the question to explain the issue better. Please let me know if it’s clear or if you need any additional details.
To allow requests from a localhost dev environment in Elastic APM Cloud, configure the server_url to point to your APM server and ensure CORS is enabled for localhost in the APM settings.
Thank you for your response. However, I am using Elastic Cloud, and I cannot find the option to configure CORS settings for the APM server. It seems that Elastic Cloud does not provide direct access to the apm-server.yml file or a UI to modify advanced configurations like CORS.
Could you please advise on how to enable CORS for http://localhost:8080 in an Elastic Cloud environment? Is there an alternative approach or workaround to allow requests from a localhost development environment?
Here are the details of my setup:
APM Server URL: https://pamp-dc8943.kb.us-east-1.aws.elastic.cloud
Note the apm vs kb perhaps you Are trying to send davida to the wrong endpoint.
I suspect your issues is that you have the RUM agent pointing to Kibana not the APM Endpoint
Per the docs
A list of permitted origins can be supplied to the apm-server.rum.allow_origins configuration option. By default, APM Server allows all origins.
FInally if you are using the new Elastic Integration
Go to
Fleet -> Agent Policies -> Elastic Cloud Agent => Edit Elastic APM
And you will see the cors setting which is already set to all origins
I suspect your issues is that you have the RUM agent pointing to Kibana not the APM Endpoint
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.