Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Add backend path prepend feature to handler configuration #95

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Add backend path prepend feature to handler configuration #95

merged 1 commit into from
Feb 19, 2024

Conversation

pmhausen
Copy link
Contributor

Hi Cedrik,

I was able to solve the "Guacamole problem" by adding a single field to the handler configuration dialog and Caddyfile template. I guess you'll like it, because it's rather unobtrusive, hidden behind "advanced settings" anyway, and does not add bloat to the plugin for rare edge cases.

The corresponding Caddy community dicussion that lead me to this solution can be found here:
https://caddy.community/t/reverse-proxy-to-a-upstream-server-with-a-path-or-subfolder/15335

Combined with the existing handle_path mechanism that gives you rather flexible rewrite options.

Kind regards,
Patrick

@Monviech Monviech self-assigned this Feb 18, 2024
@Monviech
Copy link
Owner

Hi Patrick,

this looks rather nifty and clean. I will merge this soon because I have pending changes I have to merge first from a different branch. I will have to cherry pick this probably.

Have a nice evening ^^

Copy link
Owner

@Monviech Monviech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and my tests work as expected.

Thank you for contributing. ^^

@Monviech Monviech merged commit 64aadef into Monviech:main Feb 19, 2024
@Monviech
Copy link
Owner

@pmhausen Could you include the new options you added into the readme.md, and maybe a small tutorial how to use Guacamole in the How To section would be a nice too since that configuration is quite special and an interesting usecase for these new features.

@pmhausen
Copy link
Contributor Author

README - of course. Tutorial on how to use Guacamole - sorry, no. Everything necessary to install and configure can be found here: https://guacamole.apache.org/doc/gug/

I don't see having a URL path on the backend server as "special". I will write about it in the README.

@Monviech
Copy link
Owner

Oh thank you. Sorry I didn't mean it like that. I rather meant a small "How To" using the combined "Handle_Path" with the "Backend Path". But it's not necessary.

Thanks for adding the new options to the readme. ^^

@pmhausen
Copy link
Contributor Author

pmhausen commented Feb 19, 2024

Oh - I don't use handle_path for that.

Bildschirmfoto 2024-02-19 um 15 29 10

That was just a remark about what you could theoretically do now.

Like have https://some.domain/path be handled by http://192.168.0.10/different-path ...

Whoever might need this.

I'l specifically mention Tomcat in the README, because the path component really comes from the java servlet container - that's why you cannot eliminate it in the backend.

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

Successfully merging this pull request may close these issues.

2 participants