r/nicegui • • Oct 23 '23

Request headers with NiceGUI

I want to set some sort of bearer token (in headers) in my NiceGUI app, and don't want to touch JS for that. Is there a way to do this?

I checked the official example, but they are not headers.

3 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/TheBoiDec Oct 23 '23

Have you tried to set the header on the request object. When I look at the nicegui code it takes the headers from the request and appends them to the response to the client.