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

redirects after run delete do not honor 'path.prefix' #424

Closed
dadamssg opened this issue Aug 27, 2021 · 5 comments
Closed

redirects after run delete do not honor 'path.prefix' #424

dadamssg opened this issue Aug 27, 2021 · 5 comments
Milestone

Comments

@dadamssg
Copy link

It appears that the path.prefix is only honored in the twig templates and not in the redirects from the backend. For example, the deleteSubmit() controller action redirects using the following, which simply redirects to the domain root, /.

$this->app->redirect($this->app->urlFor('home'));

If i'm hosting xhgui at https://mydomain.com/tools/xhgui/ and i have path.prefix set to /tools/xhgui/, after a delete i will be redirected to https://mydomain.com

Not a huge bug by any means but a minor annoyance.

@dadamssg dadamssg changed the title redirects after run delete does not honor 'path.prefix' redirects after run delete do not honor 'path.prefix' Aug 27, 2021
@glensc
Copy link
Contributor

glensc commented Aug 27, 2021

PR adding the config support:

@glensc
Copy link
Contributor

glensc commented Aug 27, 2021

I think it's important how have you setup your webserver, I think your "alias" is set up incorrectly so that xhgui thinks it's installed at "/" while at webserver level it's at "/tools/xhgui".

you need to rewrite the incoming/outgoing requests equally.

In Apache, it's typically ProxyPassReverse:

@dadamssg
Copy link
Author

ah, you may be right. I'm using nginx. i'll need to mess around with my nginx conf file

@glensc
Copy link
Contributor

glensc commented Aug 28, 2021

you may be right too, as I added the original change for assets to render properly. but then again, the 'home' route app should detect automatically how the app is installed.

you should post your nginx config here. it maybe something obvious, but otherwise maybe some other community member can have answer if they see the whole picture.

@glensc
Copy link
Contributor

glensc commented Jan 17, 2022

No longer an issue after slim upgrade:

In fact that slim added prefix needed to be reversed to prevent double paths:

Re-open (or create new issue) once 0.20.0 is released and this is still an issue (or is new issue).

@glensc glensc closed this as completed Jan 17, 2022
@glensc glensc added this to the 0.20.0 milestone Jan 17, 2022
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

2 participants