javascript-solid-server 0.0.24 → 0.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javascript-solid-server",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "A minimal, fast Solid server",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -276,6 +276,17 @@ export async function createProvider(issuer) {
276
276
  // Clock tolerance for token validation
277
277
  clockTolerance: 60, // 60 seconds
278
278
 
279
+ // Allow CORS for public clients from any origin
280
+ // This is needed for web apps like Mashlib loaded from CDN
281
+ clientBasedCORS: (ctx, origin, client) => {
282
+ // Allow all origins for public clients (no client_secret)
283
+ if (client.tokenEndpointAuthMethod === 'none') {
284
+ return true;
285
+ }
286
+ // For confidential clients, check registered origins
287
+ return false;
288
+ },
289
+
279
290
  // Render errors
280
291
  renderError: async (ctx, out, error) => {
281
292
  ctx.type = 'html';