Include server host in plugin input (#1514)

This commit is contained in:
WithoutPants 2021-06-21 14:38:44 +10:00 committed by GitHub
parent d7439b4832
commit 8e636545f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View File

@ -11,8 +11,8 @@ const (
type StashServerConnection struct {
// http or https
Scheme string
Port int
Host string
Port int
// Cookie for authentication purposes
SessionCookie *http.Cookie

View File

@ -127,6 +127,7 @@ func (c Cache) makeServerConnection(ctx context.Context) common.StashServerConne
serverConnection := common.StashServerConnection{
Scheme: "http",
Host: c.config.GetHost(),
Port: c.config.GetPort(),
SessionCookie: cookie,
Dir: c.config.GetConfigPath(),

View File

@ -19,7 +19,7 @@ import (
func NewClient(provider common.StashServerConnection) *graphql.Client {
portStr := strconv.Itoa(provider.Port)
u, _ := url.Parse("http://localhost:" + portStr + "/graphql")
u, _ := url.Parse("http://" + provider.Host + ":" + portStr + "/graphql")
u.Scheme = provider.Scheme
cookieJar, _ := cookiejar.New(nil)

View File

@ -11,6 +11,7 @@
* Added [DLNA server](/settings?tab=dlna). ([#1364](https://github.com/stashapp/stash/pull/1364))
### 🎨 Improvements
* Include `Host` in input to plugins. ([#1514](https://github.com/stashapp/stash/pull/1514))
* Added internationalisation for all UI pages and added zh-TW language option. ([#1471](https://github.com/stashapp/stash/pull/1471))
* Add option to disable audio for generated previews. ([#1454](https://github.com/stashapp/stash/pull/1454))
* Prompt when leaving scene edit page with unsaved changes. ([#1429](https://github.com/stashapp/stash/pull/1429))