Publish

This commit is contained in:
2023-11-18 14:30:35 +08:00
parent 61ab586f4f
commit 5ae31d8a07
10 changed files with 150 additions and 7 deletions

View File

@ -16,7 +16,6 @@ func InitServer() *fiber.App {
ServerHeader: fmt.Sprintf("RoadSign v%s", roadsign.AppVersion),
DisableStartupMessage: true,
EnableIPValidation: true,
EnablePrintRoutes: viper.GetBool("debug.print_routes"),
Prefork: viper.GetBool("performance.prefork"),
BodyLimit: viper.GetInt("hypertext.limitation.max_body_size"),
})

View File

@ -15,7 +15,7 @@ func UseProxies(app *fiber.App) {
headers := ctx.GetReqHeaders()
// Filtering sites
for _, site := range sign.C.Sites {
for _, site := range sign.App.Sites {
// Matching rules
for _, rule := range site.Rules {
if !lo.Contains(rule.Host, host) {
@ -95,7 +95,7 @@ func makeResponse(ctx *fiber.Ctx, site sign.SiteConfig) error {
}
// Forward
err := sign.C.Forward(ctx, site)
err := sign.App.Forward(ctx, site)
// Modify response
for _, transformer := range site.Transformers {