logdna / logger-node

A nodejs logger client for LogDNA
MIT License
34 stars 17 forks source link

CORS issue with client-side usage (header ‘user-agent’ is not allowed) #21

Closed psantos9 closed 4 years ago

psantos9 commented 4 years ago

Hi, I'm trying to use this library on a client-side project. I've followed the Client Side guide and white-listed my domain, however, I'm getting the following CORS error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://logs.logdna.com/logs/ingest?now=xxxxxxxxxx&hostname=xxx.xxx.xxx&mac=&ip=&tags=. (Reason: header ‘user-agent’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).

The user agent included in the request headers is @logdna/logger/1.3.2.

Is there something I'm missing?

Thanks a lot

darinspivey commented 4 years ago

Hi, thanks for notifying us. A fix will be up shortly.

darinspivey commented 4 years ago

We will get this fix into the next release cycle. I'm reopening this issue until that is complete. Stay tuned. Thanks.

darinspivey commented 4 years ago

The server-side fix for this has been deployed. Please check again to see if it works for you now. Thanks!

psantos9 commented 4 years ago

Hi Darin, I can confirm it is working now. Thanks a lot!