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

Provide option to check hostname for static assets #1778

Open
joachimvh opened this issue Nov 16, 2023 · 0 comments
Open

Provide option to check hostname for static assets #1778

joachimvh opened this issue Nov 16, 2023 · 0 comments

Comments

@joachimvh
Copy link
Member

joachimvh commented Nov 16, 2023

Feature description

In CommunitySolidServer/Recipes#31 it was discovered that there is an issue when using the init/static-root import when using subdomains for pods. The static page would also be shown at the pod roots as the StaticAssetHandler only takes the relative URL into account when deciding if it should return a resource. This was not intended behaviour for the static root and also causes the current page to not work correctly as it contains relative URLs for the account API which do not work when starting from a subdomain.

Always checking the hostname for all static resources is not a solution as it breaks the HTML representation of containers, as those depend on the static stylesheet.

A solution would be to indicate for each entry if the hostname should be taken into account or not. The StaticAssetHandler already takes the base URL of the server as input so this would not be a breaking change for the class.

The configuration generator should also be updated to not allow this combination.

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

No branches or pull requests

1 participant