mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-18 09:34:20 +01:00
config: add static file root
This commit is contained in:
@@ -35,7 +35,9 @@ type Proxy struct {
|
||||
// New returns a new Proxy instance that proxies between the services specified,
|
||||
// using the auth to validate each request's headers and get new challenge
|
||||
// headers if necessary.
|
||||
func New(auth auth.Authenticator, services []*Service) (*Proxy, error) {
|
||||
func New(auth auth.Authenticator, services []*Service, staticRoot string) (
|
||||
*Proxy, error) {
|
||||
|
||||
err := prepareServices(services)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -68,7 +70,7 @@ func New(auth auth.Authenticator, services []*Service) (*Proxy, error) {
|
||||
FlushInterval: -1,
|
||||
}
|
||||
|
||||
staticServer := http.FileServer(http.Dir("static"))
|
||||
staticServer := http.FileServer(http.Dir(staticRoot))
|
||||
|
||||
return &Proxy{
|
||||
server: grpcProxy,
|
||||
|
||||
Reference in New Issue
Block a user