@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.js CHANGED
@@ -20270,6 +20270,14 @@ var dev = async () => {
20270
20270
  workspacePreparation.succeed("Workspace is ready");
20271
20271
  const server = http.createServer((request, res) => {
20272
20272
  res.setHeader("Access-Control-Allow-Origin", "*");
20273
+ res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
20274
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
20275
+ if (request.method === "OPTIONS") {
20276
+ // Respond to OPTIONS requests with just the CORS headers and a 200 status code
20277
+ res.writeHead(200);
20278
+ res.end();
20279
+ return;
20280
+ }
20273
20281
  const done = finalhandler(request, res);
20274
20282
  serve(request, res, done);
20275
20283
  });