mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-30 01:53:34 +02:00
34 lines
699 B
Go
34 lines
699 B
Go
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",
|
|
}
|
|
|
|
// Options provides various options for the upstream request.
|
|
type Options struct {
|
|
TargetOwner,
|
|
TargetRepo,
|
|
TargetBranch,
|
|
TargetPath,
|
|
|
|
// Used for debugging purposes.
|
|
Host string
|
|
|
|
DefaultMimeType string
|
|
ForbiddenMimeTypes map[string]bool
|
|
TryIndexPages bool
|
|
BranchTimestamp time.Time
|
|
// internal
|
|
appendTrailingSlash bool
|
|
redirectIfExists string
|
|
}
|