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 embeds #276

Open
MadMan247 opened this issue Sep 25, 2024 · 1 comment
Open

Fix embeds #276

MadMan247 opened this issue Sep 25, 2024 · 1 comment

Comments

@MadMan247
Copy link

cf #76 #95
I had previously modified my nginx to allow for embeds, but the recent updates reset it, causing my embeds to break again. Please see the images below.

Context

  • Hardware: Rpi 4B+
  • YunoHost version: 11.2.30.2
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: 1.4.0~ynh4

Steps to reproduce

enable anonymous API access.
embed a funkwhale artist or album etc into a separate webpage

Expected behavior

A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.

Logs

console: The loading of “https://music.yourwebsite.com/embed.html?&type=album&id=4” in a frame is denied by “X-Frame-Options“ directive set to “sameorigin“.

If applicable and useful, add screenshots to help explain your problem.
image

@MadMan247
Copy link
Author

MadMan247 commented Sep 25, 2024

Full transparency, this is the change I initially made. I'm sure there is zero regard for best security practices in this change. /etc/nginx/conf.d/sub.domain.tld.d/funkwhale.conf ln 47.
Original:
more_set_headers "Content-Security-Policy: connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
Modified:
more_set_headers "Content-Security-Policy: connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; frame-ancestors 'self' *; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
just added frame-ancestors 'self' *;

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

1 participant