mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 12:54:24 +02:00
fix bug
This commit is contained in:
parent
045c09b518
commit
3b321e60b5
3 changed files with 8 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ build/
|
|||
vendor/
|
||||
pages
|
||||
certs.sqlite
|
||||
.bash_history
|
||||
|
|
|
@ -89,17 +89,17 @@ var (
|
|||
EnvVars: []string{"HOST"},
|
||||
Value: "[::]",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
&cli.UintFlag{
|
||||
Name: "port",
|
||||
Usage: "specifies the https port to listen to ssl requests",
|
||||
EnvVars: []string{"PORT", "HTTPS_PORT"},
|
||||
Value: "443",
|
||||
Value: 443,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
&cli.UintFlag{
|
||||
Name: "http-port",
|
||||
Usage: "specifies the http port, you also have to enable http server via ENABLE_HTTP_SERVER=true",
|
||||
EnvVars: []string{"HTTP_PORT"},
|
||||
Value: "80",
|
||||
Value: 80,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-http-server",
|
||||
|
|
|
@ -47,10 +47,10 @@ func Serve(ctx *cli.Context) error {
|
|||
rawDomain := ctx.String("raw-domain")
|
||||
mainDomainSuffix := ctx.String("pages-domain")
|
||||
rawInfoPage := ctx.String("raw-info-page")
|
||||
listeningHost := fmt.Sprintf("%s:%s", ctx.String("host"), ctx.String("port"))
|
||||
listeningSSLAddress := fmt.Sprintf("%s:%s", listeningHost, ctx.String("port"))
|
||||
listeningHost := ctx.String("host")
|
||||
listeningSSLAddress := fmt.Sprintf("%s:%d", listeningHost, ctx.Uint("port"))
|
||||
listeningHTTPAddress := fmt.Sprintf("%s:%d", listeningHost, ctx.Uint("http-port"))
|
||||
enableHTTPServer := ctx.Bool("enable-http-server")
|
||||
listeningHTTPAddress := fmt.Sprintf("%s:%s", listeningHost, ctx.String("http-port"))
|
||||
|
||||
allowedCorsDomains := AllowedCorsDomains
|
||||
if rawDomain != "" {
|
||||
|
|
Loading…
Add table
Reference in a new issue