Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2022-04-26 11:57:28 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2022-04-26 11:57:28 +0300
commitb136cc6f86655324ad2216a8a94ad519817b3641 (patch)
tree6f88c266cf15ce0a3e94b26f516ba156bdca1f96 /internal
parentc4b5a74dcade0612f6025fb548169ece6d55a7ae (diff)
parent0ee4835dc24c65acd51b85d7f668089a2d4de78c (diff)
Merge branch 'fix/acme-middleware' into 'master'
fix acme middleware passing handled requests to parent middlewares See merge request gitlab-org/gitlab-pages!736
Diffstat (limited to 'internal')
-rw-r--r--internal/acme/acme.go2
-rw-r--r--internal/acme/acme_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/acme/acme.go b/internal/acme/acme.go
index 039be32a..7b086eeb 100644
--- a/internal/acme/acme.go
+++ b/internal/acme/acme.go
@@ -31,7 +31,7 @@ func (m *Middleware) ServeAcmeChallenges(w http.ResponseWriter, r *http.Request,
}
if domain.ServeFileHTTP(w, r) {
- return false
+ return true
}
return m.redirectToGitlab(w, r)
diff --git a/internal/acme/acme_test.go b/internal/acme/acme_test.go
index 1c3025d9..225d1dc4 100644
--- a/internal/acme/acme_test.go
+++ b/internal/acme/acme_test.go
@@ -51,7 +51,7 @@ func TestServeAcmeChallengeMalformed(t *testing.T) {
}
func TestServeAcmeChallengeWhenPresent(t *testing.T) {
- require.HTTPStatusCode(t, serveAcmeOrNotFound(middleware, domainWithChallenge), http.MethodGet, challengeURL, nil, http.StatusNotFound)
+ require.HTTPStatusCode(t, serveAcmeOrNotFound(middleware, domainWithChallenge), http.MethodGet, challengeURL, nil, http.StatusOK)
}
func TestServeAcmeChallengeWhenMissing(t *testing.T) {