-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsvelte.config.js
More file actions
58 lines (50 loc) · 1.26 KB
/
Copy pathsvelte.config.js
File metadata and controls
58 lines (50 loc) · 1.26 KB
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
53
54
55
56
57
58
import adapter from '@sveltejs/adapter-cloudflare';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
vitePlugin: {
exclude: "**/time-overrides.json"
},
kit: {
adapter: adapter({
routes: {
exclude: [
"<all>",
// Stuff that vulnerability crawlers like to spam
"/*/wp-includes",
"/*/wp-includes/*",
"/wp-includes",
"/wp-includes/*",
"/wp-admin/*",
"/wp-content/*",
"/*.php",
"/*.php7",
"/*/*.php",
"/*/*.php7",
"/libraries/*",
"/.env",
"/.git/*",
"/discord",
"/boca-time",
"/products/*",
// "/history/show/*/*/merch-messages/*",
"/contact",
"/history/show"
]
}
}),
serviceWorker: {
register: false
},
prerender: {
handleHttpError: ({path, status, referrer, referenceType, message}) => {
if(path.startsWith("/cdn-cgi")) return;
throw new Error(status + (message !== status+" "+path ? " " + message : "") + " " + path + " (" + referenceType + " from " + referrer + ")");
}
}
}
};
export default config;