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

Problem with refreshing the webmin page #844

Closed
Abasz opened this issue Oct 4, 2017 · 15 comments
Closed

Problem with refreshing the webmin page #844

Abasz opened this issue Oct 4, 2017 · 15 comments

Comments

@Abasz
Copy link

Abasz commented Oct 4, 2017

Since the new 19.00 update when I try to refresh/reload the webmin page in Chrome (or reopen my tabs) the IP address is changed to the host address set for my server. E.g. I normally access the server from https://192.168.1.1/webmin. However, after refresh, my browser tries to reload it for localhost.nas/webmin (and of course it fails).I had no problems in the previous version with this.

Actually I first noticed this straight after force updating the theme.

Refreshing system information on dashboard with the bulit in reload function works perfectly

EDIT:
What is really interesting is that if I do the page reload while i have the DevTools open, the refresh works and the right url is reloaded.

I have Ubuntu Server
Accessing Webmin via https apache proxypass
Latest Chrome

@swelljoe
Copy link

swelljoe commented Oct 5, 2017

I've noticed a similar problem as well, which exhibits as redirecting to different hosts! I can't quite figure out how it's happening. I thought it was a browser thing, but it happens on both Chrome and Firefox.

@iliajie
Copy link
Collaborator

iliajie commented Oct 5, 2017

It happens of clicking Ctrl+R/F5 or it happens on reopening the browser?

@Abasz
Copy link
Author

Abasz commented Oct 5, 2017

Actually at both times

@iliajie
Copy link
Collaborator

iliajie commented Oct 5, 2017

It should reload to initial URL, otherwise it won't work. Yet at least.

What's the deal?

@Abasz
Copy link
Author

Abasz commented Oct 5, 2017

I do not think it reloads the initial URL, otherwise it would work :)

The problem is that at page refresh, instead of the initial URL (that was the https://IP address/webmin) http://SystemHostname/webmin URL is reloaded. And that latter does not work (since this was not setup as URL and thus, this has never been valid)

@iliajie
Copy link
Collaborator

iliajie commented Oct 8, 2017

The point was to redirect to initial page upon re-opening the browser and not to show only module without left menu.

I will try to change it's behavior completely. Related issue #848

@iliajie
Copy link
Collaborator

iliajie commented Oct 8, 2017

@swelljoe No mystery here. #L102-L103.

@iliajie
Copy link
Collaborator

iliajie commented Oct 10, 2017

Could you please try it with the latest commit?

However we're going to need to figure out what to do with miniserv errors in Firefox as on reload refer is dropped. Chrome works as expected.

@iliajie
Copy link
Collaborator

iliajie commented Oct 10, 2017

Refresh should now work as expected - after refresh return current URL.

@Abasz
Copy link
Author

Abasz commented Oct 11, 2017

Hi, it almost works :) but:

upon refresh IP address is kept, but the URL is changed slightly. I am accessing at https://IPaddress/webmin/

than the additional URL parts (e.g. sysinfo.cgi?xnavigation=1) is added. so upon refresh this is the URL: https://IPaddress/webmin/sysinfo.cgi?xnavigation=1

However, after refresh the /webmin part is droped and tries to reload https://IPaddress/sysinfo.cgi
And since Iam using proxypass with the /webmin suffix upon reload withouth that part the page is not reloaded correctly.

@iliajie
Copy link
Collaborator

iliajie commented Oct 11, 2017

It's fix in 19.00-patch4.

It will require this patch webmin/webmin#652 and will work on all browsers.

Please test.

@Abasz
Copy link
Author

Abasz commented Oct 11, 2017

Refresh works, however, after page refresh the left and right side navigation bars disappears. Note that in the URL the ?xnavigation=1 remains there

I appreciate the effort you are putting into this a lot

@iliajie
Copy link
Collaborator

iliajie commented Oct 11, 2017

You would need to apply this patch for pull request:

webmin/webmin#652

@iliajie
Copy link
Collaborator

iliajie commented Oct 11, 2017

For the fix you don't need to add webprefix to redirect, it should be just as this:

if ($ENV{'REQUEST_URI'} =~ /xnavigation=1/) {
 	redirect("/");
}

@Abasz
Copy link
Author

Abasz commented Oct 11, 2017

Thanks, I updated the pl file works perfect now!

Thanks

iliajie pushed a commit that referenced this issue Nov 3, 2017
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

No branches or pull requests

3 participants