Running RUM over HTTPS

I'm configuring a new APM server and I already have a Ruby Agent running on my backend. Now I'm trying to setup a frontend monitor and I came across with RUM JS.

All my application runs over HTTPS so becuase of that, I'm forced to setup the RUM agent over HTTPS to avoid mixed content.

That is how i'm initializing it

//= require elastic-apm-rum.umd.min

  serviceName: 'circle_prod',
  serverUrl: '',
  serviceVersion: '',
  logLevel: 'debug',

And for sake of test, I also created locally the following files.


But when I load my application I'm getting errors to POST it to Elastic-APM server

DevTools failed to load SourceMap: Could not load content for HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
application_v3-7775e63f66f978e7691e2e07cd29c35e.js:22240 [Elastic APM] Failed sending events! Error: HTTP status: 0
    at t.e._constructError (application_v3-7775e63f66f978e7691e2e07cd29c35e.js:22240)
    at application_v3-7775e63f66f978e7691e2e07cd29c35e.js:22240

Any idea if I'm skipping any steps?

I also have CORS on my nginx server and I get a 200 response testing it through my app server

curl -H "Origin: http://localhost"   -H "Access-Control-Request-Method: POST"   -H "Access-Control-Request-Headers: X-Requested-With"   -X OPTIONS --verbose
*   Trying
* Connected to ( port 8200 (#0)
> OPTIONS /intake/v2/rum/events HTTP/1.1
> Host:
> User-Agent: curl/7.52.1
> Accept: */*
> Origin: http://localhost
> Access-Control-Request-Method: POST
> Access-Control-Request-Headers: X-Requested-With
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers: Content-Type, Content-Encoding, Accept
< Access-Control-Allow-Methods: POST, OPTIONS
< Access-Control-Allow-Origin: http://localhost
< Access-Control-Expose-Headers: Etag
< Access-Control-Max-Age: 3600
< Content-Length: 0
< Vary: Origin
< X-Content-Type-Options: nosniff
< Date: Tue, 23 Mar 2021 03:18:13 GMT

The problem was fixed using a Nginx proxy terminating the SSL and sending it over HTTP using the local network

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