-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
svelte.config.js
52 lines (50 loc) · 1.32 KB
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
import * as child_process from 'node:child_process';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter(),
paths: {
base: ''
},
appDir: 'app',
version: {
name: child_process.execSync('git rev-parse HEAD').toString().trim().substring(0, 7)
},
csp: {
mode: 'hash',
directives: {
'default-src': ['self'],
'style-src': ['self', 'unsafe-inline'],
'script-src': [
'self',
'https://apis.google.com',
'https://www.googletagmanager.com',
'sha256-51fKcXgBxMbTyZzP+VnzmnhFOLZ64S73BpdPcaakIR0=',
'sha256-WzU0zYiNe3qRp3XlJtEt/mWMUNNFRK0WkIy73ZU4dIM='
],
'connect-src': [
'self',
'https://apis.google.com',
'https://rule34.xxx',
'https://*.rule34.xxx',
'https://*.googleapis.com',
'https://*.google-analytics.com',
'https://api.github.com'
],
'img-src': [
'self',
'https://rule34.xxx',
'https://*.rule34.xxx',
'https://*.googleusercontent.com',
'https://www.googletagmanager.com'
],
'media-src': ['self', 'https://rule34.xxx', 'https://*.rule34.xxx'],
'frame-src': ['https://r34-react.firebaseapp.com']
}
}
}
};
export default config;