mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-22 02:41:23 +02:00
Allow using env variables in custom API URL
This commit is contained in:
parent
3914e24b3d
commit
bacb607d90
@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
type CustomApi struct {
|
type CustomApi struct {
|
||||||
widgetBase `yaml:",inline"`
|
widgetBase `yaml:",inline"`
|
||||||
URL string `yaml:"url"`
|
URL OptionalEnvString `yaml:"url"`
|
||||||
Template string `yaml:"template"`
|
Template string `yaml:"template"`
|
||||||
Frameless bool `yaml:"frameless"`
|
Frameless bool `yaml:"frameless"`
|
||||||
Headers map[string]OptionalEnvString `yaml:"headers"`
|
Headers map[string]OptionalEnvString `yaml:"headers"`
|
||||||
@ -42,7 +42,7 @@ func (widget *CustomApi) Initialize() error {
|
|||||||
|
|
||||||
widget.compiledTemplate = compiledTemplate
|
widget.compiledTemplate = compiledTemplate
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodGet, widget.URL, nil)
|
req, err := http.NewRequest(http.MethodGet, widget.URL.String(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user