@flaghoist/server 0.2.2 → 0.2.3
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.cjs +8 -0
- package/dist/index.js +8 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -574,6 +574,14 @@ function createFlagServer(config) {
|
|
|
574
574
|
const cache = createDefinitionCache();
|
|
575
575
|
const resolve = (env) => typeof config === "function" ? config(env) : config;
|
|
576
576
|
const app = new import_hono.Hono();
|
|
577
|
+
app.use("*", async (c, next) => {
|
|
578
|
+
await next();
|
|
579
|
+
c.header("X-Content-Type-Options", "nosniff");
|
|
580
|
+
c.header("X-Frame-Options", "DENY");
|
|
581
|
+
c.header("Content-Security-Policy", "frame-ancestors 'none'");
|
|
582
|
+
c.header("Referrer-Policy", "no-referrer");
|
|
583
|
+
c.header("Permissions-Policy", "geolocation=(), microphone=(), camera=(), payment=(), usb=()");
|
|
584
|
+
});
|
|
577
585
|
app.use("*", async (c, next) => {
|
|
578
586
|
const cfg = resolve(c.env);
|
|
579
587
|
const origin = c.req.header("Origin");
|
package/dist/index.js
CHANGED
|
@@ -544,6 +544,14 @@ function createFlagServer(config) {
|
|
|
544
544
|
const cache = createDefinitionCache();
|
|
545
545
|
const resolve = (env) => typeof config === "function" ? config(env) : config;
|
|
546
546
|
const app = new Hono();
|
|
547
|
+
app.use("*", async (c, next) => {
|
|
548
|
+
await next();
|
|
549
|
+
c.header("X-Content-Type-Options", "nosniff");
|
|
550
|
+
c.header("X-Frame-Options", "DENY");
|
|
551
|
+
c.header("Content-Security-Policy", "frame-ancestors 'none'");
|
|
552
|
+
c.header("Referrer-Policy", "no-referrer");
|
|
553
|
+
c.header("Permissions-Policy", "geolocation=(), microphone=(), camera=(), payment=(), usb=()");
|
|
554
|
+
});
|
|
547
555
|
app.use("*", async (c, next) => {
|
|
548
556
|
const cfg = resolve(c.env);
|
|
549
557
|
const origin = c.req.header("Origin");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flaghoist/server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Hono app factory for Flaghoist: OFREP evaluate, admin CRUD, and pluggable auth.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@flaghoist/core": "0.1.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@flaghoist/
|
|
53
|
-
"@flaghoist/
|
|
52
|
+
"@flaghoist/dashboard": "0.0.0",
|
|
53
|
+
"@flaghoist/adapter-memory": "0.1.2"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|