reprogl
1package backend2
3import (4"net/http"5"sync"6
7"xelbot.com/reprogl/api"8"xelbot.com/reprogl/container"9"xelbot.com/reprogl/security"10)
11
12type FormError struct {13Message string `json:"message"`14Path string `json:"path"`15}
16
17var backendLocker sync.Mutex18
19func send(req *http.Request) (*http.Response, error) {20backendLocker.Lock()21defer backendLocker.Unlock()22
23req.Header.Set("Authorization", "WSSE profile=\"UsernameToken\"")24
25wsseHeader, wsseToken := security.GetWSSEHeader()26req.Header.Set(wsseHeader, wsseToken)27
28return api.Send(req)29}
30
31func apiURL() string {32return container.GetConfig().BackendApiUrl33}
34