@scalar/fastify-api-reference 1.25.34 → 1.25.36

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/dist/index.js CHANGED
@@ -14445,7 +14445,7 @@ const fastifyApiReference = fp(
14445
14445
  const spec = getLoadedSpecIfAvailable();
14446
14446
  const filename = await getSpecFilenameSlug(spec);
14447
14447
  const json = JSON.parse(await spec.toJson());
14448
- return reply.header("Content-Type", `application/json`).header("Content-Disposition", `filename=${filename}.json`).send(json);
14448
+ return reply.header("Content-Type", `application/json`).header("Content-Disposition", `filename=${filename}.json`).header("Access-Control-Allow-Origin", "*").header("Access-Control-Allow-Methods", "*").send(json);
14449
14449
  }
14450
14450
  });
14451
14451
  const openApiSpecUrlYaml = `${getRoutePrefix(options.routePrefix)}${getOpenApiDocumentEndpoints(options.openApiDocumentEndpoints).yaml}`;
@@ -14459,7 +14459,7 @@ const fastifyApiReference = fp(
14459
14459
  const spec = getLoadedSpecIfAvailable();
14460
14460
  const filename = await getSpecFilenameSlug(spec);
14461
14461
  const yaml = await spec.toYaml();
14462
- return reply.header("Content-Type", `application/yaml`).header("Content-Disposition", `filename=${filename}.yaml`).send(yaml);
14462
+ return reply.header("Content-Type", `application/yaml`).header("Content-Disposition", `filename=${filename}.yaml`).header("Access-Control-Allow-Origin", "*").header("Access-Control-Allow-Methods", "*").send(yaml);
14463
14463
  }
14464
14464
  });
14465
14465
  const doesNotIgnoreTrailingSlash = fastify.initialConfig.ignoreTrailingSlash !== true;