@embeddable.com/sdk-core 2.5.4 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +8 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -20243,6 +20243,14 @@ var dev = async () => {
|
|
|
20243
20243
|
workspacePreparation.succeed("Workspace is ready");
|
|
20244
20244
|
const server = http.createServer((request, res) => {
|
|
20245
20245
|
res.setHeader("Access-Control-Allow-Origin", "*");
|
|
20246
|
+
res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
|
|
20247
|
+
res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
|
|
20248
|
+
if (request.method === "OPTIONS") {
|
|
20249
|
+
// Respond to OPTIONS requests with just the CORS headers and a 200 status code
|
|
20250
|
+
res.writeHead(200);
|
|
20251
|
+
res.end();
|
|
20252
|
+
return;
|
|
20253
|
+
}
|
|
20246
20254
|
const done = finalhandler(request, res);
|
|
20247
20255
|
serve(request, res, done);
|
|
20248
20256
|
});
|