-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faro receiver component #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great progress! Left a comment around cors handling, otherwise this looks like it is coming together.
pkg/receiver/faro/receiver.go
Outdated
resp.Header().Set("Access-Control-Allow-Origin", "*") | ||
resp.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS") | ||
resp.Header().Set("Access-Control-Allow-Headers", "Content-Type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The confighttp.ServerConfig
struct we embed has a CORS
member we can configure. We shouldn't have to handle cors ourselves but we might want to add *
in our default config because if left unset, cors will be disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's true - I'll fix this right away.
pkg/receiver/faro/encoder.go
Outdated
) | ||
|
||
const ( | ||
pbContentType = "application/x-protobuf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this variable used anywhere? couldn't find
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think it's leftover from the draft, will remove.
No description provided.