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

Fix : allow use of subfolders in the url with reverse proxies #454

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

anthonymasset
Copy link

This fix allow to use owc behind a reverse proxy using a subfolder in the url.
Ex : https://www.domain.fr/owc/

The index page generates all the paths correctly. t also works with urls without subfolders.
Ex : https://owc.domain.fr

@niccokunzmann
Copy link
Owner

niccokunzmann commented Aug 13, 2024

Thanks for your fix! The tests show that the about page has a problem.. Could you check that we can visit the about page and also the about page works? The code should work with /index.html and / as well as /about.html and /calendar.html.

I think what you would like to achieve is to add everything before the first / to the DEFAULT_URL - is that what you would like to do?

@anthonymasset
Copy link
Author

It should be ok now. The pytest fail because of the url tested that is absolute in place of relative. If I modify that on my computer, the test pass.

@niccokunzmann
Copy link
Owner

Thanks, this looks much more like it adresses the scale of the change - relative links!
I found that the tests fail because some absolute links are tested for. Here is an example:

link = f'<link rel="alternate" type="text/calendar" href="/calendar.ics?{html.escape(query)}" />'

@niccokunzmann
Copy link
Owner

It looks alright and we can merge when twe tests pass, I think.

@niccokunzmann
Copy link
Owner

Hi, can I help you with anything for this PR?

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