Skip to content

Commit 28de776

Browse files
fix: csp settings
1 parent 451287d commit 28de776

3 files changed

Lines changed: 8 additions & 16 deletions

File tree

clients/web/csp.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ export function generateCSP(isDev = false) {
1515
directives: {
1616
"default-src": [SELF],
1717
"frame-src": [SELF],
18-
"script-src": isDev ? [SELF, UNSAFE_EVAL] : [SELF, WASM_UNSAFE_EVAL],
19-
"style-src": isDev ? [SELF, UNSAFE_INLINE] : [SELF],
18+
"script-src": isDev
19+
? [SELF, UNSAFE_EVAL, process.env.VITE_FATHOM_URL]
20+
: [SELF, WASM_UNSAFE_EVAL, process.env.VITE_FATHOM_URL],
21+
"style-src": [SELF, UNSAFE_INLINE],
2022
"connect-src": [SELF, "127.0.0.1", "127.0.0.1:*", "ws://localhost:5173/"],
21-
"img-src": [SELF],
23+
"img-src": [SELF, process.env.VITE_FATHOM_URL],
2224
"object-src": [NONE],
2325
},
2426
});

clients/web/index.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@
1111
id="app"
1212
class="grid bg-navy-700 bg-opacity-70 grid-rows-[var(--header-height),calc(100vh-calc(var(--header-height)+var(--footer-height))),var(--footer-height)] h-screen"
1313
></div>
14-
<div
15-
style="
16-
z-index: -10;
17-
position: absolute;
18-
inset: 0px;
19-
opacity: 0.5;
20-
overflow: hidden;
21-
"
22-
>
23-
<img style="width: 100%; height: 100%" src="/bg.webp" aria-hidden />
14+
<div class="z-[-10] absolute inset-0 opacity-50 overflow-hidden">
15+
<img class="w-full h-full" src="/bg.webp" aria-hidden />
2416
</div>
2517
<!-- this one is handled by Vite. No need for subpath-->
2618
<script type="module" src="/src/render-client.tsx"></script>

clients/web/src/components/calls/detail-pane/traces/popover/tool-tip/row.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { type JSXElement, Show } from "solid-js";
33
export function Row(props: { title: string; children?: JSXElement }) {
44
return (
55
<tr class="grid grid-cols-2 text-left">
6-
<th style={{ "grid-column": props.children ? "" : "span 2" }}>
7-
{props.title}
8-
</th>
6+
<th class={props.children ? "" : "col-span-2"}>{props.title}</th>
97
<Show when={props.children}>
108
<td>{props.children}</td>
119
</Show>

0 commit comments

Comments
 (0)