Remove CSP for now, will not work because of react bug
This commit is contained in:
parent
13b02c39a0
commit
72884ee715
10
app/root.tsx
10
app/root.tsx
@ -157,20 +157,17 @@ function getMarkup(
|
|||||||
<div className="App">
|
<div className="App">
|
||||||
<Navigation {...loaderData} />
|
<Navigation {...loaderData} />
|
||||||
{children}
|
{children}
|
||||||
<Scripts nonce={loaderData.nonce} />
|
<Scripts />
|
||||||
</div>
|
</div>
|
||||||
</ChakraProvider>
|
</ChakraProvider>
|
||||||
</StrictMode>
|
</StrictMode>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html
|
<html data-theme={loaderData.theme} lang="en-US">
|
||||||
data-theme={loaderData.theme}
|
|
||||||
lang="en-US"
|
|
||||||
>
|
|
||||||
<head>
|
<head>
|
||||||
<Links />
|
<Links />
|
||||||
<style nonce={loaderData.nonce}>
|
<style>
|
||||||
{`
|
{`
|
||||||
:root {
|
:root {
|
||||||
color-scheme: ${loaderData.theme};
|
color-scheme: ${loaderData.theme};
|
||||||
@ -180,7 +177,6 @@ function getMarkup(
|
|||||||
{serverStyleData?.map(({ key, ids, css }) => (
|
{serverStyleData?.map(({ key, ids, css }) => (
|
||||||
<style
|
<style
|
||||||
key={key}
|
key={key}
|
||||||
nonce={loaderData.nonce}
|
|
||||||
data-emotion={`${key} ${ids.join(" ")}`}
|
data-emotion={`${key} ${ids.join(" ")}`}
|
||||||
dangerouslySetInnerHTML={{ __html: css }}
|
dangerouslySetInnerHTML={{ __html: css }}
|
||||||
/>
|
/>
|
||||||
|
@ -86,10 +86,7 @@ async function setBody(context: RequestContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function setHeaders(context: RequestContext) {
|
async function setHeaders(context: RequestContext) {
|
||||||
const nonce = crypto.randomUUID().replaceAll("-", "");
|
|
||||||
context.data.nonce = nonce;
|
|
||||||
const response = await context.next();
|
const response = await context.next();
|
||||||
|
|
||||||
const rtvValues = [
|
const rtvValues = [
|
||||||
"Aldaria",
|
"Aldaria",
|
||||||
"Altadena",
|
"Altadena",
|
||||||
@ -104,10 +101,6 @@ async function setHeaders(context: RequestContext) {
|
|||||||
"Wintervale",
|
"Wintervale",
|
||||||
];
|
];
|
||||||
|
|
||||||
response.headers.set(
|
|
||||||
"Content-Security-Policy",
|
|
||||||
`connect-src https://o1071757.ingest.sentry.io https://storage.googleapis.com 'self'; default-src 'self'; frame-src https://challenges.cloudflare.com; img-src https://cdn.discordapp.com https://mediaproxy.carcrushers.cc 'self'; media-src https://mediaproxy.carcrushers.cc; report-uri https://o1071757.ingest.sentry.io/api/6069431/security/?sentry_key=3d2b34700e6942f9b739cd8b2001f70f; script-src https://challenges.cloudflare.com nonce-${nonce} 'self'; style-src nonce-${nonce} 'self'`,
|
|
||||||
);
|
|
||||||
response.headers.set("Permissions-Policy", "clipboard-write=(self)");
|
response.headers.set("Permissions-Policy", "clipboard-write=(self)");
|
||||||
response.headers.set("Referrer-Policy", "same-origin");
|
response.headers.set("Referrer-Policy", "same-origin");
|
||||||
response.headers.set(
|
response.headers.set(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user