@semiont/backend 0.4.22 → 0.5.1

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
@@ -15565,6 +15565,10 @@ var openapi_default = {
15565
15565
  correlationId: {
15566
15566
  type: "string"
15567
15567
  },
15568
+ _userId: {
15569
+ type: "string",
15570
+ description: "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
15571
+ },
15568
15572
  token: {
15569
15573
  type: "string"
15570
15574
  },
@@ -15574,9 +15578,6 @@ var openapi_default = {
15574
15578
  content: {
15575
15579
  type: "string"
15576
15580
  },
15577
- userId: {
15578
- type: "string"
15579
- },
15580
15581
  archiveOriginal: {
15581
15582
  type: "boolean"
15582
15583
  }
@@ -15585,8 +15586,7 @@ var openapi_default = {
15585
15586
  "correlationId",
15586
15587
  "token",
15587
15588
  "name",
15588
- "content",
15589
- "userId"
15589
+ "content"
15590
15590
  ]
15591
15591
  },
15592
15592
  YieldCloneCreated: {
@@ -17582,7 +17582,18 @@ var securityHeaders = () => {
17582
17582
  "max-age=31536000; includeSubDomains"
17583
17583
  );
17584
17584
  }
17585
- const csp = [
17585
+ const isSwaggerUi = c.req.path === "/api/docs" || c.req.path === "/api/swagger";
17586
+ const csp = isSwaggerUi ? [
17587
+ "default-src 'none'",
17588
+ "script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
17589
+ "style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
17590
+ "img-src 'self' data: https://cdn.jsdelivr.net",
17591
+ "font-src 'self' https://cdn.jsdelivr.net",
17592
+ "connect-src 'self'",
17593
+ "frame-ancestors 'none'",
17594
+ "base-uri 'self'",
17595
+ "form-action 'none'"
17596
+ ].join("; ") : [
17586
17597
  "default-src 'none'",
17587
17598
  // Block everything by default
17588
17599
  "frame-ancestors 'none'",