liveview-native / liveview-client-swiftui

MIT License
379 stars 39 forks source link

Allow to set optional headers #1456

Closed nighthawk closed 2 months ago

nighthawk commented 2 months ago

These are passed on to Phoenix when the LiveView makes the initial connection.

Sample use case: Passing an "Authorization" HTTP header to authenticate a user in the LiveView with a token that's fetched outside of LiveView and stored in the user's keychain. That particular header should not be set on URLSessionConfiguration directly.

Related Slack thread for reference.

bcardarella commented 2 months ago

Being pre 1.0 we could accept this for v0.3.1 but I want to confirm with @carson-katri about it first

carson-katri commented 2 months ago

@simlay We'll need a way to pass headers to the dead render in core for v0.4.0.

carson-katri commented 2 months ago

Can you add a line to the CHANGELOG.md file mentioning the new parameter?

bcardarella commented 2 months ago

@nighthawk this should go under Added in the CHANGELOG.md

nighthawk commented 2 months ago

@carson-katri Code review addressed and updated the change log, too.

bcardarella commented 2 months ago

thank you, @carson-katri will be able to sign off on this on Tuesday

bcardarella commented 2 months ago

Thank you!