Experimental: Update traefik Host() rules for v3
This commit is contained in:
parent
34db2e1923
commit
285aaff77d
10 changed files with 60 additions and 13 deletions
|
|
@ -2,6 +2,8 @@ package liquid
|
|||
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/config"
|
||||
)
|
||||
|
||||
// Domain returns the full domain name of this WissKI
|
||||
|
|
@ -9,6 +11,15 @@ func (liquid *Liquid) Domain() string {
|
|||
return liquid.Config.HTTP.HostFromSlug(liquid.Slug)
|
||||
}
|
||||
|
||||
func (liquid *Liquid) Hostname() string {
|
||||
return liquid.Domain() + ".wisski"
|
||||
}
|
||||
|
||||
// HostRule returns a host rule for this wisski
|
||||
func (liquid *Liquid) HostRule() string {
|
||||
return config.MakeHostRule(liquid.Domain())
|
||||
}
|
||||
|
||||
// URL returns the public URL of this instance
|
||||
func (liquid *Liquid) URL() *url.URL {
|
||||
// setup domain and path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue