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(lib/vscode): update csp in webview to allow ports #4131

Merged
merged 1 commit into from
Sep 10, 2021
Merged

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Sep 10, 2021

With #3895, we caused a regression where the Content-Security-Policy prevented
images in the previewer to not work due to the ports in the resource URI.

This modifies the CSP in the webview to make sure images are not blocked by CSP.

I assume once we upgrade VS Code, we will revert this change.

Screeshot

See notes here: #3936 (comment)

Fixes #3936 #4098

TODOs

Looks like this PR is a two-for-one!

image

With #3895, we caused a regression where the Content-Security-Policy prevented
images in the previewer to not work due to the ports in the resource URI.

This modifies the CSP in the webview to make sure images are not blocked by CSP.

I assume once we upgrade VS Code, we will revert this change.
@jsjoeio jsjoeio requested a review from a team as a code owner September 10, 2021 00:55
@jsjoeio jsjoeio self-assigned this Sep 10, 2021
@jsjoeio jsjoeio added the bug Something isn't working label Sep 10, 2021
@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #4131 (592d9bc) into main (8a1c129) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4131   +/-   ##
=======================================
  Coverage   64.12%   64.12%           
=======================================
  Files          36       36           
  Lines        1873     1873           
  Branches      379      379           
=======================================
  Hits         1201     1201           
  Misses        571      571           
  Partials      101      101           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a1c129...592d9bc. Read the comment docs.

@github-actions
Copy link

✨ Coder.com for PR #4131 deployed! It will be updated on every commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot open jpg, gif, or png in code-server web IDE
2 participants