Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcbc5172

Browse files
committed
Merge branch 'main' into revert-external-auth-wall
2 parentsd113e25 +4d39da2 commitcbc5172

File tree

50 files changed

+4097
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4097
-179
lines changed

‎coderd/apidoc/docs.go

Lines changed: 169 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/coderd.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,14 @@ func New(options *Options) *API {
10671067
// See globalHTTPSwaggerHandler comment as to why we use a package
10681068
// global variable here.
10691069
r.Get("/swagger/*",globalHTTPSwaggerHandler)
1070+
}else {
1071+
swaggerDisabled:=http.HandlerFunc(func(rw http.ResponseWriter,r*http.Request) {
1072+
httpapi.Write(context.Background(),rw,http.StatusNotFound, codersdk.Response{
1073+
Message:"Swagger documentation is disabled.",
1074+
})
1075+
})
1076+
r.Get("/swagger",swaggerDisabled)
1077+
r.Get("/swagger/*",swaggerDisabled)
10701078
}
10711079

10721080
// Add CSP headers to all static assets and pages. CSP headers only affect

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp