Skip to content

Conversation

@jtojnar
Copy link
Member

@jtojnar jtojnar commented Oct 6, 2025

Depends on: #1533
Fixes: #1525

Simplifies PSR-4 definition.
More type safe and allows to introduce extra validations.
0c8e133 introduced `<base>` tag
into the template, which was based on directory of `SCRIPT_NAME`.
This configurations where selfoss was behind a reverse proxy mapping
it into a subdirectory, using `base_url` config.
Use early return to make the code slightly more legible.

This is also a prerequisite for overriding just the path when non-absolute URL is configured.
This is required by both uses:

- RSS controller: RSS feeds are supposed to contain absolute paths
- Session: Cookies depend on URI scheme and host

If `base_url` was configured to an absolute path reference, not an absolute URI,
those would fail.
@netlify
Copy link

netlify bot commented Oct 6, 2025

Deploy Preview for selfoss ready!

Name Link
🔨 Latest commit 09aa2d5
🔍 Latest deploy log https://app.netlify.com/projects/selfoss/deploys/68e387ce9ce37d000897262d
😎 Deploy Preview https://deploy-preview-1534--selfoss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Base URL path incorrectly set behind reverse proxy

2 participants