diff --git a/CHANGELOG.md b/CHANGELOG.md index 04bee82..8dbce78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`. diff --git a/package.json b/package.json index 2157234..d94f0e5 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/extension.ts b/src/extension.ts index bc2253e..3744748 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -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);