Add js.fetch:mode to be used in wasm.

This commit is contained in:
Kalle Carlbark 2020-05-27 15:47:37 +02:00
parent f0c5180e03
commit a27a5c67ea
No known key found for this signature in database
GPG key ID: 5E4BAB01A57CDD62

View file

@ -53,6 +53,7 @@ func (n *NetBox) FetchSessionKey(privatekey string) error {
}
request.Header.Add("Accept", "application/json")
request.Header.Add("Content-Type", "application/x-www-form-urlencoded")
request.Header.Add("js.fetch:mode", "no-cors")
request.Header.Add("Authorization", " Token "+n.Token)
response, err := client.Do(request)
if err != nil {