mirror of
https://github.com/portainer/portainer.git
synced 2025-11-26 14:06:05 +08:00
fix(container): prevent user from editing the portainer container it self EE-917 (#6093)
* fix(container): prevent from editing portainer container * fix(container): prevent from editing portainer container * Missing kill operation * fix(container): enhance creating stack from template * fix(docker): prevent user from editing the portainer container itself EE-917 * fix(docker): enhance code style * fix(container): fix issues from code review * fix(container): enhance creating stack from template * fix(container): some code review issues * fix(container): disable leave network when the container is portainer * fix(container): disable leave network when the container is portainer
This commit is contained in:
@@ -52,9 +52,9 @@ func (handler *Handler) proxyRequestsToDockerAPI(w http.ResponseWriter, r *http.
|
||||
|
||||
id := strconv.Itoa(endpointID)
|
||||
|
||||
prefix := "/" + id + "/agent/docker";
|
||||
prefix := "/" + id + "/agent/docker"
|
||||
if !strings.HasPrefix(r.URL.Path, prefix) {
|
||||
prefix = "/" + id + "/docker";
|
||||
prefix = "/" + id + "/docker"
|
||||
}
|
||||
|
||||
http.StripPrefix(prefix, proxy).ServeHTTP(w, r)
|
||||
|
||||
Reference in New Issue
Block a user