Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.9.5 no longer honoring -base #620

Closed
RXWatcher opened this issue Oct 28, 2016 · 16 comments
Closed

1.9.5 no longer honoring -base #620

RXWatcher opened this issue Oct 28, 2016 · 16 comments

Comments

@RXWatcher
Copy link

Plex Requests.Net Version:

1.9.5

Operating System:

Ubuntu 16.04

Mono Version:

4.6.1

Reproduction Steps:

my base is plexrequests.
launch plex requests with the -base plexrequests
mono /opt/plexrequests/PlexRequests.exe -p 3000 -base plexrequests

I know in a previous bug report you said we shouldnt be using it but please let me explain why we need it. The Plex Requests install that I use is scripted to install the PlexRequests.Net, install an apache reverse proxy and start the application. The end user calls the base URL to get to the application for initial setup. The use of the -base allows the base url to be set without manually setting it in the application by first setting up PlexRequests on a non-base url and then adding the base via the app or somehow hacking the sql lite db. In my opinion this is a logical reason to continue to have -base as an option.

Thank you!

@tidusjar
Copy link
Member

Try -b pleaserequests

@RXWatcher
Copy link
Author

No, issue remains. The initial setup is correct but as soon as you add your admin user and hit finish then it errors. So the issue is that the setup honors the -b flag but the main application does not. I have specifically tried it with your example.

@Magikarplvl4
Copy link
Contributor

We don't support a -b set. @tidusjar maybe we can support it?

@tidusjar
Copy link
Member

I still don't understand your usecase for using it.

Once you have set your base url in the admin page, you never have to change it again.

@Magikarplvl4
Copy link
Contributor

Magikarplvl4 commented Oct 28, 2016

I think he running a service for customers to auto provision and do the installation automatic for plexrequest.net. Is that right?

@RXWatcher
Copy link
Author

correct. This is for the Quickbox.io seedbox setup. There is an automated installer that installs it for the end user and then the user only has access to the redirected URL.

If you didnt have --base or -b then the initial setup would have to be done without a base in order for the base to be entered into the admin section. That doesnt work if all the end user has is access to is the reverse proxied url. They never see plex requests in its native none-base form at all. that would be cumbersome in a remote host. You would need to either expose the native non-base port and have the user go in and manually set the base and then close that port or they would somehow need to connect into the host to run it locally(vnc/x2go, etc).

This behavior changed in 1.9.5. Previous to that the application honored --base throughout the app. Now, what I'm seeing is that the initial setup honors it but after that, it doesnt. Once you enter the admin user/pass and hit finish it ignores it and all urls like https://host/pleaserequests/search and https://host/pleaserequests/userlogin get shortened to http://host/search and http://host/userlogin.

Trying it locally on the host produces the same error for example:
I will get redirected to http://localhost:3000/userlogin if I call http://localhost:3000/pleaserequests/
If I manually edit the url to be http://localhost:3000/pleaserequests/userlogin then it works correctly.

@tidusjar
Copy link
Member

And 1.9.4 was fine?

@RXWatcher
Copy link
Author

I believe it worked except the initial setup screen where you authenticate to plex. Once you got past that by not using the reverse proxy to do the intial setup then I think it honored it throughout the app.

That was fixed in 1.9.5. #615

Perhaps I am mistaken but I'm pretty sure it worked without manually entering in the base url.

@tidusjar
Copy link
Member

So you are saying that the app is now not listening to the base url after the initial 'setup wizard'.

So when you hit http://localhost:3000/pleaserequests you are being redirected to http://localhost:3000/userlogin correct?

@RXWatcher
Copy link
Author

correct

@Magikarplvl4
Copy link
Contributor

i'm not sure if going too support it but @tidusjar can give it a shot?

@RXWatcher
Copy link
Author

an easy solution would be to have the base in a file we can update...maybe its not easy. I'm not a .net dev so I shouldn't speak on 'easy'. I looked to see if I could inject the base somehow into the sqlite db but its encoded and I think you'd need to run through the initial setup to build that out anyway, right?

I'm trying to come up with ways to do it without adding more work for you.

Thanks again for making Plex Requests.net. In my opinion its far better than the meteor alternative.

@tidusjar
Copy link
Member

Yeah everything in the database is encrypted.

Give me a few hours and I'll see what I can do.

@tidusjar
Copy link
Member

Here you go: https://ci.appveyor.com/project/tidusjar/requestplex/build/1.9.916/artifacts

A custom build that has fixed this issue. I'll get this merged up into the dev branch and it will be in the next release. But the build above is the same as 1.9.6 except your fix.

@RXWatcher
Copy link
Author

yes! This fixes it! I see it even populated the base value inside the app.

Thank you!

@Magikarplvl4
Copy link
Contributor

Fixed in version 1.9.7

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

No branches or pull requests

3 participants