Skip to content

Commit

Permalink
whitelist additions and chat header fix (#4429)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianjelfs authored Sep 24, 2023
1 parent 8db9d2c commit 76cb98a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/app/.ic-assets.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Content-Security-Policy": "frame-ancestors https://ht7v7-iaaaa-aaaak-qakga-cai.icp0.io https://mdocx-gyaaa-aaaak-qcbsq-cai.icp0.io https://calm-pasca-49d7be.netlify.app http://localhost:5173 https://zexzi-jyaaa-aaaam-abj3q-cai.icp0.io https://xw4dq-4yaaa-aaaam-abeuq-cai.ic0.app;",
"Content-Security-Policy": "frame-ancestors https://spyzr-gqaaa-aaaan-qd66q-cai.icp0.io https://221bravo.app https://ht7v7-iaaaa-aaaak-qakga-cai.icp0.io https://mdocx-gyaaa-aaaak-qcbsq-cai.icp0.io https://calm-pasca-49d7be.netlify.app http://localhost:5173 https://zexzi-jyaaa-aaaam-abj3q-cai.icp0.io https://xw4dq-4yaaa-aaaam-abeuq-cai.ic0.app;",
},
allow_raw_access: false,
},
Expand Down
4 changes: 3 additions & 1 deletion frontend/app/src/components/home/CurrentChat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import { framed } from "../../stores/xframe";
import { rightPanelHistory } from "../../stores/rightPanel";
import AcceptRulesModal from "./AcceptRulesModal.svelte";
import { mobileWidth } from "../../stores/screenDimensions";
type ConfirmedActionEvent =
| ConfirmedSendMessage
Expand Down Expand Up @@ -82,6 +83,7 @@
let showAcceptRulesModal = false;
let sendMessageContext: ConfirmedActionEvent | undefined = undefined;
$: showChatHeader = !$mobileWidth || !$framed;
$: messageContext = { chatId: chat.id };
$: currentChatTextContent = client.currentChatTextContent;
$: currentChatReplyingTo = client.currentChatReplyingTo;
Expand Down Expand Up @@ -387,7 +389,7 @@
bind:searchTerm
on:goToMessageIndex
on:close={() => (showSearchHeader = false)} />
{:else if !$framed}
{:else if showChatHeader}
<CurrentChatHeader
on:clearSelection
on:markAllRead={onMarkAllRead}
Expand Down
12 changes: 7 additions & 5 deletions frontend/app/src/stores/xframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { setModifiedTheme } from "../theme/themes";
import { routerReady } from "../routes";

const FRAME_ANCESTORS = [
"https://ht7v7-iaaaa-aaaak-qakga-cai.icp0.io",
"https://mdocx-gyaaa-aaaak-qcbsq-cai.icp0.io",
"https://calm-pasca-49d7be.netlify.app",
"http://localhost:5173",
"https://zexzi-jyaaa-aaaam-abj3q-cai.icp0.io",
"https://xw4dq-4yaaa-aaaam-abeuq-cai.ic0.app",
"https://calm-pasca-49d7be.netlify.app", // betbase proof of concept
"https://221bravo.app",
"https://ht7v7-iaaaa-aaaak-qakga-cai.icp0.io", //221bravo
"https://mdocx-gyaaa-aaaak-qcbsq-cai.icp0.io",
"https://zexzi-jyaaa-aaaam-abj3q-cai.icp0.io", //Betbase dev
"https://xw4dq-4yaaa-aaaam-abeuq-cai.ic0.app", //Betbase live
"https://spyzr-gqaaa-aaaan-qd66q-cai.icp0.io", // vaultbet
];

type XFrameMessage = UpdateTheme | ChangeRoute;
Expand Down

0 comments on commit 76cb98a

Please sign in to comment.