mirror of
https://github.com/project-zot/zot.git
synced 2025-03-18 02:22:53 -05:00
Added content-type to Access-Control-Allow-Headers needed for playground preflight
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
This commit is contained in:
parent
2929a62998
commit
74630ed3a0
2 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ func (c *Controller) CORSHandler(response http.ResponseWriter, request *http.Req
|
|||
}
|
||||
|
||||
response.Header().Set("Access-Control-Allow-Methods", "HEAD,GET,POST,OPTIONS")
|
||||
response.Header().Set("Access-Control-Allow-Headers", "Authorization")
|
||||
response.Header().Set("Access-Control-Allow-Headers", "Authorization,content-type")
|
||||
}
|
||||
|
||||
func DumpRuntimeParams(log log.Logger) {
|
||||
|
|
|
@ -269,7 +269,7 @@ func TestHtpasswdSingleCred(t *testing.T) {
|
|||
So(resp, ShouldNotBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, http.StatusOK)
|
||||
|
||||
header := []string{"Authorization"}
|
||||
header := []string{"Authorization,content-type"}
|
||||
|
||||
resp, _ = resty.R().SetBasicAuth(user, password).Options(baseURL + "/v2/")
|
||||
So(resp, ShouldNotBeNil)
|
||||
|
|
Loading…
Add table
Reference in a new issue