mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
Split code into multiple files
This commit is contained in:
parent
1a80684e79
commit
241f7a57ec
4 changed files with 298 additions and 271 deletions
11
domains.go
Normal file
11
domains.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import "github.com/valyala/fasthttp"
|
||||
|
||||
// getTargetFromDNS searches for CNAME entries on the request domain, optionally with a "www." prefix, and checks if
|
||||
// the domain is included in the repository's "domains.txt" file. If everything is fine, it returns the target data.
|
||||
func getTargetFromDNS(ctx *fasthttp.RequestCtx) (targetOwner, targetRepo, targetBranch, targetPath string) {
|
||||
// TODO: read CNAME record for host and "www.{host}" to get those values
|
||||
// TODO: check domains.txt
|
||||
return
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue