1

In vaadin flow ( version 14! ), how can I add additional request headers to all frontend to server requests? For example, i want to add: xhttp.setRequestHeader("my-token", "abcdef123456"); It is needed, because of some nginx auth settings. Thanx for the answers Viktor

Viktor Gintner
  • 135
  • 2
  • 13

1 Answers1

2

There isn't any built-in feature for doing this. What you can probably do is to use some JavaScript to override the built-in method that is internally used by Vaadin to send those requests. See How do I set a default Header for all XMLHTTPRequests for an example.

Leif Åstrand
  • 7,820
  • 13
  • 19