mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
move handler into its own package
This commit is contained in:
parent
8519bba527
commit
7acb60874e
5 changed files with 6 additions and 5 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
"codeberg.org/codeberg/pages/server/certificates"
|
||||
"codeberg.org/codeberg/pages/server/database"
|
||||
"codeberg.org/codeberg/pages/server/gitea"
|
||||
"codeberg.org/codeberg/pages/server/handler"
|
||||
)
|
||||
|
||||
// AllowedCorsDomains lists the domains for which Cross-Origin Resource Sharing is allowed.
|
||||
|
@ -88,7 +89,7 @@ func Serve(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
// Create handler based on settings
|
||||
httpsHandler := server.Handler(mainDomainSuffix, rawDomain,
|
||||
httpsHandler := handler.Handler(mainDomainSuffix, rawDomain,
|
||||
giteaClient,
|
||||
rawInfoPage,
|
||||
BlacklistedPaths, allowedCorsDomains,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package server
|
||||
package handler
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package server
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http/httptest"
|
|
@ -1,4 +1,4 @@
|
|||
package server
|
||||
package handler
|
||||
|
||||
import (
|
||||
"strings"
|
|
@ -1,4 +1,4 @@
|
|||
package server
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
Loading…
Add table
Add a link
Reference in a new issue