code-server version: 1.31.1-100, also tested on 1.32.0-310
When attempting to view an in-VSCode markdown preview, the following error appears:
command 'markdown.showPreview' not found
Will fix!
Markdown preview does not seem to work on latest release (2.1698-vsc1.41.1). There are no errors, but the preview window is empty.
@code-asher
Seems to be an IFRAME security issue. By opening the browser debugging tools,
On Firefox:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://v1.extapi.coder.com/extensionquery. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://v1.extapi.coder.com/extensionquery. (Reason: CORS request did not succeed).
Load denied by X-Frame-Options: “DENY” from “https://<redacted>.com/webview/index.html?id=<redacted>”, site does not permit any framing. Attempted to load into “https://<redacted>.com/?folder=vscode-remote%3A%2F%2Fcode-server%3A8080%2F<redacted>”.
On Chrome:
Refused to display 'https://<redacted>.com/webview/index.html?id=<redacted>' in a frame because it set 'X-Frame-Options' to 'deny'.
Opened #1409 for you @ViRb3
Apologies, the problem was in an inherited nginx config:
# XSS
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
Everything works after I cleared those headers.
Most helpful comment
Will fix!