mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Include server host in plugin input (#1514)
This commit is contained in:
@@ -11,7 +11,7 @@ const (
|
|||||||
type StashServerConnection struct {
|
type StashServerConnection struct {
|
||||||
// http or https
|
// http or https
|
||||||
Scheme string
|
Scheme string
|
||||||
|
Host string
|
||||||
Port int
|
Port int
|
||||||
|
|
||||||
// Cookie for authentication purposes
|
// Cookie for authentication purposes
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ func (c Cache) makeServerConnection(ctx context.Context) common.StashServerConne
|
|||||||
|
|
||||||
serverConnection := common.StashServerConnection{
|
serverConnection := common.StashServerConnection{
|
||||||
Scheme: "http",
|
Scheme: "http",
|
||||||
|
Host: c.config.GetHost(),
|
||||||
Port: c.config.GetPort(),
|
Port: c.config.GetPort(),
|
||||||
SessionCookie: cookie,
|
SessionCookie: cookie,
|
||||||
Dir: c.config.GetConfigPath(),
|
Dir: c.config.GetConfigPath(),
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import (
|
|||||||
func NewClient(provider common.StashServerConnection) *graphql.Client {
|
func NewClient(provider common.StashServerConnection) *graphql.Client {
|
||||||
portStr := strconv.Itoa(provider.Port)
|
portStr := strconv.Itoa(provider.Port)
|
||||||
|
|
||||||
u, _ := url.Parse("http://localhost:" + portStr + "/graphql")
|
u, _ := url.Parse("http://" + provider.Host + ":" + portStr + "/graphql")
|
||||||
u.Scheme = provider.Scheme
|
u.Scheme = provider.Scheme
|
||||||
|
|
||||||
cookieJar, _ := cookiejar.New(nil)
|
cookieJar, _ := cookiejar.New(nil)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
* Added [DLNA server](/settings?tab=dlna). ([#1364](https://github.com/stashapp/stash/pull/1364))
|
* Added [DLNA server](/settings?tab=dlna). ([#1364](https://github.com/stashapp/stash/pull/1364))
|
||||||
|
|
||||||
### 🎨 Improvements
|
### 🎨 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))
|
* 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))
|
* 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))
|
* Prompt when leaving scene edit page with unsaved changes. ([#1429](https://github.com/stashapp/stash/pull/1429))
|
||||||
|
|||||||
Reference in New Issue
Block a user