mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
Refactor split long functions (#135)
we have big functions that handle all stuff ... we should split this into smaler chuncks so we could test them seperate and make clear cuts in what happens where Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/135
This commit is contained in:
parent
b9966487f6
commit
6c63b66ce4
17 changed files with 547 additions and 427 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,9 +89,9 @@ func Serve(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
// Create handler based on settings
|
||||
httpsHandler := server.Handler(mainDomainSuffix, rawDomain,
|
||||
httpsHandler := handler.Handler(mainDomainSuffix, rawDomain,
|
||||
giteaClient,
|
||||
giteaRoot, rawInfoPage,
|
||||
rawInfoPage,
|
||||
BlacklistedPaths, allowedCorsDomains,
|
||||
dnsLookupCache, canonicalDomainCache)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue