mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-31 23:59:32 +01:00
Merge pull request #10364 from reasonerjt/disable-token-service-xsrf-1.10
Disable XSRF check for /service/token - cherry pick to 1.10
This commit is contained in:
commit
dd80db67c1
@ -27,6 +27,13 @@ type Handler struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// Prepare disables xsrf for /service/token endpoint.
|
||||
// This is done on purpose b/c containerd will try to send POST and fallback to GET
|
||||
// more details see #10305
|
||||
func (h *Handler) Prepare() {
|
||||
h.EnableXSRF = false
|
||||
}
|
||||
|
||||
// Get handles GET request, it checks the http header for user credentials
|
||||
// and parse service and scope based on docker registry v2 standard,
|
||||
// checks the permission against local DB and generates jwt token.
|
||||
|
Loading…
Reference in New Issue
Block a user