Transactions throwing 403 Forbidden


(Sagar Talla) #1

This api is resulting in http://.*.com/v1/client-side/transactions 403 Forbidden.
On the local machine it is working fine.

I find this in the apm-server logs

2018-05-29T07:14:48.393Z	ERROR	[request]	beater/handlers.go:384	error handling request	{"request_id": "01e195a0-f20e-4942-98e7-b4fcee146ec1", "error": "forbidden request"}
2018-05-29T07:14:48.393Z	INFO	[request]	beater/handlers.go:150	handled request	{"request_id": "01e195a0-f20e-4942-98e7-b4fcee146ec1", "response_code": 403, "method": "POST", "URL": "/v1/client-side/transactions", "content_length": 1621, "remote_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"}

Not able to figure out why this is happening and how to debug. Both(local and the server) have the configuration


(Juan Alvarez) #2

Hi, thanks for the report.

There are 2 likely causes for that:

One is that frontend is disabled (which is the case by default); for that you need to set apm-server.frontend.enabled = true in the apm-server.yml configuration file.
When starting the apm-server you should see something like "Frontend endpoints enabled".

The other one is that the request might be rejected for having the wrong CORS headers; you can whitelist any origins in the config option apm-server.frontend.allow_origins.
By default is ["*"], which means that all origins are allowed.

Let me know if this helps!


(system) #3

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