Skip to content

Commit dfdd460

Browse files
authored
fix: Use origin property instead of hostname (#7)
1 parent 1d158e2 commit dfdd460

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

assets/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ def get_config():
8888
stash = get_stash_client()
8989

9090
config.PLUGIN_DIR = config.FRAGMENT["server_connection"]['PluginDir']
91-
config.PLUGIN_HTTP_ASSETS_PATH = stash.url.replace('/graphql',
92-
'/plugin/StashInteractiveTools/assets').replace(
93-
"127.0.0.1", config.FRAGMENT["args"].get("hostname", '127.0.0.1'))
91+
origin = config.FRAGMENT["args"].get("origin", stash.url.replace('/graphql', ''))
92+
config.PLUGIN_HTTP_ASSETS_PATH = f'{origin}/plugin/StashInteractiveTools/assets'
9493

9594
c = stash.find_plugin_config(config.ID)
9695
config.ENABLE_TAGGING = bool(c.get('enable_tagging'))

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const InteractiveTools = ({ scene }: SceneFileInfoPanelProps) => {
151151
args: {
152152
mode: 'init',
153153
scene_id: scene.id,
154-
hostname: window.location.hostname,
154+
origin: window.location.origin,
155155
},
156156
},
157157
}).catch(console.error);

0 commit comments

Comments
 (0)