Skip to content

In JsnlogConfiguration add allowed header array. #200

@mb16

Description

@mb16

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions