getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 148 forks source link

Add Origin HTTP header #101

Closed aisk closed 8 years ago

aisk commented 8 years ago

Someone want use raven-go in client environment without secret key, but current the SDK don't pass an Origin header to Server


This change is Reviewable

mattrobenolt commented 8 years ago

This is not a supported method of using the Go SDK. There's a reason public key requires an Origin header. This only works with raven-js.

aisk commented 8 years ago

Hi @mattrobenolt , if I want use raven-go in a client app, should I use the secret key to initialize it? is it safe?

mattrobenolt commented 8 years ago

It's just as safe as what you were trying to do. But safe is relative. The question is "what can someone do with this key?" The worse they can do is write fake data into your account. The key is write only and bound to a single project. There's no way the key would allow any sort of read access or mutation of other data besides event data.

aisk commented 8 years ago

Thank you @mattrobenolt , I think this behavior is acceptable for me, I'll use the secret key in client.