elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.39k stars 555 forks source link

fix: fix invalid permissions-policy value for fullscreen #2941

Closed shuuji3 closed 1 week ago

shuuji3 commented 3 weeks ago

fix #2935

The current Elk responds to the request with an invalid value in the Permissions-Policy HTTP Header.

This PR replaced the value with *, which is the correct value to allow the fullscreen feature for all domains:

-Permissions-Policy camera=(), display-capture=(), fullscreen='self' https: http:, geolocation=(), microphone=()
+Permissions-Policy camera=(), display-capture=(), fullscreen=*, geolocation=(), microphone=()

References:

netlify[bot] commented 3 weeks ago

Deploy Preview for elk-zone ready!

Name Link
Latest commit b3cd933666d1e2d6d2d0c793a672d088b0a4f9f4
Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/66d997ce275be3000821e46c
Deploy Preview https://deploy-preview-2941--elk-zone.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 site configuration.

netlify[bot] commented 3 weeks ago

Deploy Preview for elk-docs canceled.

Name Link
Latest commit b3cd933666d1e2d6d2d0c793a672d088b0a4f9f4
Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/66d997ced5a941000801ae58
shuuji3 commented 3 weeks ago

It looks like Netlify preview doesn't return Permissions-Policy header: image

I checked the response header value by building the app and running pnpm run start:https locally instead.

image

chhe commented 3 weeks ago

The preview deployment still just displays the elk logo and nothing else for me.

Edit: I can't find any error messages in the console log. (The messages I previously mentioned came from one of my Chrome extension and not from Elk)

I'm currently using Chrome Version 129.0.6668.29 (Official Build) beta (64-bit). With Chrome Version 130.0.6699.0 (Official Build) canary (64-bit) evrything works.

shuuji3 commented 3 weeks ago

Thanks, I can also confirm that only Elk logo is shown in the same version of Google Chrome Beta.

Screenshot from 2024-09-05 22-35-55

This might mean that there is some issue other than the Permissions-Policy header, and that's not compatible with Google Chrome v129.

Jawvig commented 1 week ago

This PR still looks like a valid fix for the header value, even though it doesn't fix the Chrom(ium) 129 white out issue.

shuuji3 commented 1 week ago

Yes, there seems to be some unknown issue causing the white-out issue only on Chromium v129 other than this.