mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
host detection fixed in prod mode
This commit is contained in:
@@ -17,9 +17,7 @@ export default function SettingsDialog() {
|
|||||||
const [open, setOpen] = useState(false)
|
const [open, setOpen] = useState(false)
|
||||||
const [settings, setSets] = useState({})
|
const [settings, setSets] = useState({})
|
||||||
const [show, setShow] = useState(false)
|
const [show, setShow] = useState(false)
|
||||||
|
const [tsHost, setTSHost] = useState(getTorrServerHost())
|
||||||
const { protocol, hostname, port } = window.location
|
|
||||||
const [tsHost, setTSHost] = useState(getTorrServerHost() || `${protocol}//${hostname}${port ? `:${port}` : ''}`)
|
|
||||||
|
|
||||||
const handleClickOpen = () => setOpen(true)
|
const handleClickOpen = () => setOpen(true)
|
||||||
const handleClose = () => setOpen(false)
|
const handleClose = () => setOpen(false)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
let torrserverHost = process.env.REACT_APP_SERVER_HOST || ''
|
const { protocol, hostname, port } = window.location
|
||||||
|
|
||||||
|
let torrserverHost = process.env.REACT_APP_SERVER_HOST || `${protocol}//${hostname}${port ? `:${port}` : ''}`
|
||||||
|
|
||||||
export const torrentsHost = () => `${torrserverHost}/torrents`
|
export const torrentsHost = () => `${torrserverHost}/torrents`
|
||||||
export const viewedHost = () => `${torrserverHost}/viewed`
|
export const viewedHost = () => `${torrserverHost}/viewed`
|
||||||
|
|||||||
Reference in New Issue
Block a user