balena-io-experimental / browser

A drop-in web browser block
101 stars 80 forks source link

Add feature to set headers in the request #146

Closed oscni closed 2 months ago

oscni commented 1 year ago

Would be very useful to be able to set headers in the request.

phil-d-wilson commented 2 months ago

What headers in what request @oscni ?

oscni commented 2 months ago

http headers in http requests

phil-d-wilson commented 2 months ago

Sure. The block only makes requests itself to other services running on the device to automatically find what else it could display. Any actual requests are made through chrome-launcher which does not support request headers.

oscni commented 2 months ago

yeah i noticed that it doesn't support it natively but I actually got it working by modifying this repo. It involved spinning up a small local API webserver which present the header information and then a chrome pluing that loads that header information at startup and in all requests uses that header information. Just thought it would be good if the feature is supported in balena-browser since it's useful in many setups.