@protobase/server 0.26.5 → 0.26.6
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/api-cors.js +4 -1
- package/dist/create-admin.js +4 -2
- package/package.json +4 -4
package/dist/api-cors.js
CHANGED
package/dist/create-admin.js
CHANGED
|
@@ -223,11 +223,13 @@ const createAdmin = ({ resources: appResources, views: appViews = [], pages = []
|
|
|
223
223
|
if (corsOrigins !== void 0 || ownOrigins.length > 1) {
|
|
224
224
|
const answering = [authBasePath, ...Object.entries(apiFunctions).filter(([, fn]) => fn.options.cors).map(([name]) => `${systemPath}/functions/${name}`)];
|
|
225
225
|
const skip = (path) => answering.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
|
|
226
|
-
|
|
226
|
+
const cors = apiCors({
|
|
227
227
|
own: ownOrigins,
|
|
228
228
|
allowed: corsOrigins ?? [],
|
|
229
229
|
skip
|
|
230
|
-
})
|
|
230
|
+
});
|
|
231
|
+
app.use(`${systemPath}/*`, cors);
|
|
232
|
+
if (auth && !"/auth/v1".startsWith(`${systemPath}/`)) app.use(`${goTruePath}/*`, cors);
|
|
231
233
|
}
|
|
232
234
|
if (auth) {
|
|
233
235
|
app.route(authBasePath, statusRoute(auth, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.6",
|
|
4
4
|
"description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.7.7",
|
|
34
34
|
"@better-auth/sso": "^1.7.7",
|
|
35
|
-
"@protobase/layout": "0.26.
|
|
36
|
-
"@protobase/query": "0.26.
|
|
37
|
-
"@protobase/schema": "0.26.
|
|
35
|
+
"@protobase/layout": "0.26.6",
|
|
36
|
+
"@protobase/query": "0.26.6",
|
|
37
|
+
"@protobase/schema": "0.26.6",
|
|
38
38
|
"@react-email/render": "^2.1.0",
|
|
39
39
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
40
40
|
"@sentry/core": "^11.7.0",
|