question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Option to pass extra headers to Component

See original GitHub issue

It would be nice if there was some higher-level way to configure extra headers for a Component. Currently, this can only be done by changing the session_factory.

Our use-case is auth-headers, hence we would probably prefer extra headers as an argument to the Component constructor (I would volunteer for a PR). I am unsure if there is a use-case for extra-headers from the config. Opinions?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
oberstetcommented, Mar 17, 2019

Ah, ok, so the Q is how to achieve with Component what ApplicationRunner allows with headers here https://github.com/crossbario/autobahn-python/blob/e00005e297048b05d1e1c46d94c8a2383ce89fed/autobahn/twisted/wamp.py#L154

@meejah not sure … I remember we’ve been working on getting Component and ApplicationRunner to feature parity rgd knobs … like timeouts and such. Does that cover ^ also?

0reactions
meejahcommented, Oct 7, 2019

@asodeur if an enhancement to transport= configurations will work for your use-case and you’re still interested in doing a PR, that sounds like a sensible approach to me!

I am in #autobahn as meejah if you want real-time discussion. The reason I think “transports” is the right place is because it’s a transport-specific option (e.g. you might have a “unix” socket and a websocket in the transports list; the header only makes sense for the websocket one).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding option to pass additional headers in ... - GitHub
This change adds an async function getHeaders() as a prop to the <ProxiedSignInPage /> component, which will get called to get the headers...
Read more >
Angular - Set headers for every request - Stack Overflow
Update - June 2018 I see a lot of people going for this solution but I would advise otherwise. Appending header globally will...
Read more >
React Native Tutorial #25 - Custom Header Component
Hey gang, in this React Native tutorial we'll take a look at how to create a custome header component.
Read more >
Custom Headers | Theme Developer Handbook
Custom Header. Custom headers allow site owners to upload their own “title” image to their site, which can be placed at the top...
Read more >
Using Axios to set request headers - LogRocket Blog
Passing an object argument ... Axios methods such as post() and get() enable us to attach headers to requests by supplying a headers'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found