Skip to content

Commit 3bf7f27

Browse files
committed
Added content security policy
1 parent da5f8e0 commit 3bf7f27

File tree

5 files changed

+323
-9
lines changed

5 files changed

+323
-9
lines changed

Caddyfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ http://localhost:2020 {
3434
http:// {
3535
root * /app/dist
3636
file_server
37+
header Content-Security-Policy "default-src 'self'; connect-src {env.GRAPHQL_ENDPOINT}; style-src 'self' 'sha256-xGV5EQQkhfzt8q6nGkoKAAVcmITvYwkeAwFuMJcSIKE='; font-src data:"
3738

3839
handle_path /__/config.js {
3940
header Content-Type application/javascript

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
display: flex;
1818
align-items: center;
1919
justify-content: center;
20-
font-size: 4rem;
20+
font-size: 4rem
2121
}
2222
</style>
23-
<script type="application/javascript" src="/__/config.js"></script>
23+
<script crossorigin="anonymous" type="application/javascript" src="/__/config.js"></script>
2424
</head>
2525

2626
<body>
2727
<div id="root"></div>
28-
<script type="module" src="./src/main.tsx"></script>
28+
<script type="module" async defer src="./src/main.tsx"></script>
2929
</body>
3030
</html>

0 commit comments

Comments
 (0)