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

0.0.10 - Added Access-Control-Allow-Origin: * #7

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [0.0.10]

- Added `Access-Control-Allow-Origin: *` response header to allow calling VSCode REST Control from web browsers.

## [0.0.9]

- Add support for processing URL encoded requests in the form `?command=value&args=urlencoded-of-json-representation-of-args`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "This extension allows you to remotely control Visual Studio Code via a REST endpoint, taking automation to the next level.",
"publisher": "dpar39",
"license": "MIT",
"version": "0.0.9",
"version": "0.0.10",
"engines": {
"vscode": "^1.55.0"
},
Expand Down
1 change: 1 addition & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const startHttpServer = async (
const endBadRequest = (err: any, res: ServerResponse) => {
res.statusCode = 400;
const errStringJson = JSON.stringify(err, Object.getOwnPropertyNames(err));
res.setHeader("Access-Control-Allow-Origin", "*");
res.write(errStringJson);
res.end();
Logger.error(errStringJson);
Expand Down
Loading