@getstrata/starter 2.0.4 → 2.0.5
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/cli.js +7 -3
- package/dist/templates/package.json +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2842,6 +2842,9 @@ function renderEnvExample(projectName, layers) {
|
|
|
2842
2842
|
lines.push("# OAUTH_STATE_SECRET=");
|
|
2843
2843
|
}
|
|
2844
2844
|
lines.push("# --oidc (cookie HTML) seals PKCE in the oidc_pkce cookie. Do not call OidcProvider.getAuthorizationUrl().");
|
|
2845
|
+
lines.push("# Explicit browser origins and application request headers (defaults stay enabled):");
|
|
2846
|
+
lines.push("# CORS_ALLOWED_ORIGINS=https://app.example.com");
|
|
2847
|
+
lines.push("# CORS_ADDITIONAL_ALLOWED_HEADERS=Idempotency-Key,X-Correlation-Id");
|
|
2845
2848
|
const billingOn = Boolean(layers.extras.billing);
|
|
2846
2849
|
lines.push(`FEATURE_BILLING=${envFlag(billingOn)}`);
|
|
2847
2850
|
if (billingOn) {
|
|
@@ -3060,9 +3063,9 @@ function renderPackageJson(projectName, options = {}) {
|
|
|
3060
3063
|
"@getstrata/cli": "workspace:*",
|
|
3061
3064
|
"@getstrata/core": "workspace:*"
|
|
3062
3065
|
} : {
|
|
3063
|
-
"@getstrata/bootstrap": "^2.0.
|
|
3064
|
-
"@getstrata/cli": "^2.0.
|
|
3065
|
-
"@getstrata/core": "^2.0.
|
|
3066
|
+
"@getstrata/bootstrap": "^2.0.5",
|
|
3067
|
+
"@getstrata/cli": "^2.0.5",
|
|
3068
|
+
"@getstrata/core": "^2.0.5"
|
|
3066
3069
|
};
|
|
3067
3070
|
coreDeps.eta = "^4.6.0";
|
|
3068
3071
|
if (options.layers?.database === "mysql") {
|
|
@@ -3401,6 +3404,7 @@ The image sets \`APP_ENV=production\` and \`AUTH_DEV_HEADERS=false\`; everything
|
|
|
3401
3404
|
- Set \`APP_URL\` to the public origin (for example \`https://app.example.com\`). Signed links and redirects are built from it; localhost is rejected.
|
|
3402
3405
|
- Set \`AUTH_DEV_HEADERS=false\`.
|
|
3403
3406
|
- Set \`FEATURE_PUBLIC_READS=false\`. Generated \`.env.example\` already ships \`false\` so \`wrapWebPublicRead\` requires a login. Local storefronts may set \`true\` in \`.env\` for an anonymous catalog; \`assertProductionSecrets()\` rejects \`true\` in production. Do not ship a public-reads production boot.
|
|
3407
|
+
- Add explicitly approved application headers with \`CORS_ADDITIONAL_ALLOWED_HEADERS=Idempotency-Key,X-Correlation-Id\`; this extends the defaults, validates header names and never reflects requested headers. OpenAPI metadata does not grant CORS access.
|
|
3404
3408
|
- Cross-origin browser calls are off in production until you set \`CORS_ALLOWED_ORIGINS\` to explicit origins. A \`*\` entry is rejected. Non-browser clients are unaffected.
|
|
3405
3409
|
- Behind a reverse proxy or load balancer, set \`TRUST_FORWARDED_FOR=true\` so throttles and session records see the client address instead of the proxy. Only the rightmost public hop of \`X-Forwarded-For\` is trusted.
|
|
3406
3410
|
${authUsesCookie(layers.auth) ? "- Set `SESSION_SECRET` to 32+ characters.\n" : ""}${authUsesToken(layers.auth) ? "- Set `TOKEN_HASH_PEPPER`.\n" : ""}${layers.extras.scim ? "- Set `SCIM_BEARER_TOKEN`.\n" : ""}${layers.extras.metrics ? "- Set `METRICS_TOKEN`.\n" : ""}${layers.extras.oauthGithub ? "- Set `OAUTH_STATE_SECRET` and `GITHUB_CLIENT_ID` / `GITHUB_CLIENT_SECRET`.\n" : ""}${layers.extras.oidc ? "- Set `OAUTH_STATE_SECRET`, `OIDC_ISSUER`, `OIDC_CLIENT_ID`, and `OIDC_CLIENT_SECRET`. Loopback issuers work outside production; set `OIDC_ALLOW_PRIVATE=true` for other private IdPs.\n" : ""}${layers.extras.billing ? "- Set `STRIPE_WEBHOOK_SECRET` when `FEATURE_BILLING=true`.\n" : ""}${layers.tenancy === "rls" ? `- \`DATABASE_URL\` must be a \`NOBYPASSRLS\` role, not the \`postgres\` superuser. Generated apps create \`${GENERATED_POSTGRES_APP_ROLE}\` via \`db/ensure-postgres-app-role.sql\` (and Compose init on first empty volume). \`MIGRATION_DATABASE_URL\` may stay the superuser for CREATE ROLE / GRANT / migrate. Production boot rejects username \`postgres\` or \`root\`, then inspects \`pg_roles\` for \`rolsuper\` / \`rolbypassrls\`.
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"check": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@getstrata/bootstrap": "^2.0.
|
|
16
|
-
"@getstrata/cli": "^2.0.
|
|
17
|
-
"@getstrata/core": "^2.0.
|
|
15
|
+
"@getstrata/bootstrap": "^2.0.5",
|
|
16
|
+
"@getstrata/cli": "^2.0.5",
|
|
17
|
+
"@getstrata/core": "^2.0.5",
|
|
18
18
|
"eta": "^4.6.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|