Viktor Gintner
Viktor Gintner

Reputation: 135

Vaadin flow additional request headers

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

Upvotes: 1

Views: 752

Answers (1)

Leif Åstrand
Leif Åstrand

Reputation: 8001

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.

Upvotes: 2

Related Questions