pages-server/server/upstream/upstream.go

32 lines
649 B
Go
Raw Normal View History

2021-12-05 13:47:33 +00:00
package upstream
import (
"time"
)
// upstreamIndexPages lists pages that may be considered as index pages for directories.
var upstreamIndexPages = []string{
"index.html",
}
// upstreamNotFoundPages lists pages that may be considered as custom 404 Not Found pages.
var upstreamNotFoundPages = []string{
"404.html",
}
2021-12-05 13:47:33 +00:00
// Options provides various options for the upstream request.
type Options struct {
TargetOwner,
TargetRepo,
TargetBranch,
TargetPath,
DefaultMimeType string
ForbiddenMimeTypes map[string]bool
2021-12-05 16:57:54 +00:00
TryIndexPages bool
BranchTimestamp time.Time
// internal
appendTrailingSlash bool
redirectIfExists string
2021-12-05 13:47:33 +00:00
}