Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/handler/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Index struct {

GithubConfig *githubapp.Config
Templates templatetree.Tree[*template.Template]
Config *githubapp.Config
}

func (h *Index) ServeHTTP(w http.ResponseWriter, r *http.Request) error {
Expand All @@ -38,6 +39,11 @@ func (h *Index) ServeHTTP(w http.ResponseWriter, r *http.Request) error {
PolicyPath string
}

if h.Config.HideRootPath {
http.NotFound(w, r)
return nil
}

data.AppName = h.AppName
data.Version = version.GetVersion()
data.GitHubURL = h.GithubConfig.WebURL
Expand Down
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func New(c *Config) (*Server, error) {
Base: basePolicyHandler,
GithubConfig: &c.Github,
Templates: templates,
Config: &c.Github,
}))

detailsHandler := handler.Details{
Expand Down
11 changes: 11 additions & 0 deletions vendor/github.com/palantir/go-githubapp/githubapp/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.