Skip to content
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

In JsnlogConfiguration add allowed header array. #200

Open
mb16 opened this issue Apr 10, 2023 · 0 comments
Open

In JsnlogConfiguration add allowed header array. #200

mb16 opened this issue Apr 10, 2023 · 0 comments

Comments

@mb16
Copy link

mb16 commented Apr 10, 2023

I am using JSNLog Cross origin, so the corsAllowedOriginsRegex is helpful. I am also wanting to use the defaultBeforeSend function on the client to add specific data to all requests. Normally I would simply add the data to the message, but it appears that the json I passed to the logger has been stringified, and so its not easy know if it is safe to modify this data. It would also be easy to append headers in the defaultBeforeSend function to the xhr object. Unfortunately the LogProcessor.cs explicitly appends a list of allowed headers:

response.AppendHeader("Access-Control-Allow-Headers", "jsnlog-requestid, content-type");

I would appreciate a new config property that could be an array of strings, which would itemize additional headers to be appended to the list above when using cors.

Thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant