mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 03:26:57 +00:00
Add TODOs
This commit is contained in:
parent
2e970dbcda
commit
76e5d8e77c
4 changed files with 13 additions and 4 deletions
4
main.go
4
main.go
|
@ -71,6 +71,7 @@ var IndexPages = []string{
|
|||
|
||||
// main sets up and starts the web server.
|
||||
func main() {
|
||||
// TODO: CLI Library
|
||||
if len(os.Args) > 1 && os.Args[1] == "--remove-certificate" {
|
||||
if len(os.Args) < 2 {
|
||||
println("--remove-certificate requires at least one domain as an argument")
|
||||
|
@ -105,7 +106,7 @@ func main() {
|
|||
|
||||
server := &fasthttp.Server{
|
||||
Handler: compressedHandler,
|
||||
DisablePreParseMultipartForm: false,
|
||||
DisablePreParseMultipartForm: true,
|
||||
MaxRequestBodySize: 0,
|
||||
NoDefaultServerHeader: true,
|
||||
NoDefaultDate: true,
|
||||
|
@ -151,6 +152,7 @@ func main() {
|
|||
}
|
||||
|
||||
// envOr reads an environment variable and returns a default value if it's empty.
|
||||
// TODO: to helpers.go or use CLI framework
|
||||
func envOr(env string, or string) string {
|
||||
if v := os.Getenv(env); v != "" {
|
||||
return v
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue