mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-20 09:00:13 +01:00
Fix Codacy issues
This commit is contained in:
parent
5645cd23fe
commit
741f315f14
19 changed files with 163 additions and 135 deletions
|
|
@ -23,6 +23,7 @@ func New(token string) *API {
|
|||
}
|
||||
}
|
||||
|
||||
// EnableCors is a middleware that enables CORS for the API
|
||||
func (api *API) EnableCors(fn http.HandlerFunc) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Access-Control-Allow-Origin", "*")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue