Skip to content

Corrected issues with sed reserved characters#2

Merged
guysoft merged 1 commit into
guysoft:target_serverfrom
bkraul:target_server
Jan 1, 2019
Merged

Corrected issues with sed reserved characters#2
guysoft merged 1 commit into
guysoft:target_serverfrom
bkraul:target_server

Conversation

@bkraul
Copy link
Copy Markdown

@bkraul bkraul commented Dec 31, 2018

Corrected issues with sed reserved characters

This was causing the TARGET_SERVER to perform incorrect sed substitution. Fixed it by using a different separator , instead of the /. This means that paths can now be directly entered into the TARGET_SERVER variable, as such:

TARGET_SERVER=0.0.0.0:000/path

Added path filtering

On some instances, such as it is the case with Plex, proxying into a path is not enough, because the http files have the path hardcoded. Adding a filter block allows for those URLs to be rewritten in the response, allowing the assets to be loaded correctly. There might be some tweaks to make here, but the initial implementation seems to be working.

In order to use the functionality, a path must be used in TARGET_SERVER and the FILTER_PATH variable must be set to 1 (this is a safeguard, to ensure filtering is not done by default).

A new TARGET_SERVER URL-parsing block has been added to start.sh it can successfully dissect every part of the URL allowing for better future substitutions if needed. I am only using the path parsing part of it at the moment.

Other changes

Removed the HTTP_PATH variable, as it can now be extracted from the TARGET_SERVER parsing block.

@guysoft guysoft merged commit 0b6feeb into guysoft:target_server Jan 1, 2019
@bkraul
Copy link
Copy Markdown
Author

bkraul commented Jan 1, 2019

Closes #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants