mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-06 07:11:55 +09:00
## Description Project Settings starts with an empty response-header rule list. Users can add valid HTTP response headers for all paths (`/*`) or an Authentication-style route such as `/private/*`, and remove any configured rule. The Headers and Authentication views share the accessible rule-list form. The header form suggests standard response-header names and common values for the selected header, while accepting custom names and values. `Set-Cookie` is not suggested because a rule can store only one value per header and would replace existing cookies. `X-Powered-By`, `X-Content-Type-Options`, and `Strict-Transport-Security` are dispatcher-owned and cannot be configured. Users may configure `Content-Security-Policy`, `X-Frame-Options`, and `Referrer-Policy`; when absent, the dispatcher supplies their defaults. The SDK validates header names, values, routes, duplicates, and size limits. The CLI emits only configured rules. Customization requires Pro for custom-domain publishing, while unchanged defaults and staging remain available on Free plans. The server checks the saved production snapshot against the project owner's plan. Companion Cloud worker PR: https://github.com/webstudio-is/webstudio-saas/pull/664. Deploy its dispatcher support before exposing these settings in the Builder. Other hosts need an adapter that applies the generated rules; Webstudio Cloud dispatcher defaults do not apply automatically elsewhere. Static exports do not apply headers automatically. ## Validation - SDK, CLI, Builder browser, publish-warning, and production-build tests pass. - Builder, SDK, and CLI typechecks and lint pass. - The companion Cloud worker tests, typecheck, and lint pass. Replaces https://github.com/webstudio-is/webstudio/pull/6428 to use `headers.staging`. Closes https://github.com/webstudio-is/webstudio/issues/4748
20 lines
476 B
TypeScript
20 lines
476 B
TypeScript
import { Grid, styled, theme } from "@webstudio-is/design-system";
|
|
|
|
export const ProjectSettingsDataRow = styled(Grid, {
|
|
p: theme.spacing[3],
|
|
overflow: "hidden",
|
|
position: "relative",
|
|
"& > button, & > [role='cell'] > button": {
|
|
opacity: 0,
|
|
position: "absolute",
|
|
right: theme.spacing[2],
|
|
top: "50%",
|
|
transform: "translateY(-50%)",
|
|
},
|
|
"&:hover, &:focus-within": {
|
|
"& > button, & > [role='cell'] > button": {
|
|
opacity: 1,
|
|
},
|
|
},
|
|
});
|