-
-
Notifications
You must be signed in to change notification settings - Fork 70
/
nuxt.config.js
282 lines (265 loc) · 7.13 KB
/
nuxt.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
const CEVER_BACKEND_BASE_FALLBACK = 'https://ctfever-service.uniiem.com'
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
target: process.env.CEVER_RUN_MODE || "static",
server: {
host: process.env.NODE_ENV === 'production' ? '0.0.0.0' : 'localhost'
},
publicRuntimeConfig: {
version: process.env.CEVER_VERSION || 'unstable',
CEVER_BACKEND_BASE: process.env.CEVER_BACKEND_BASE || null,
CEVER_BACKEND_BASE_FALLBACK: CEVER_BACKEND_BASE_FALLBACK
},
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: "CTFever Toolkit by uniiem",
meta: [
{charset: "utf-8"},
{
title: "viewport",
name: "viewport",
content:
"width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"
},
{
hid: "description",
name: "description",
title: "description",
content: "免费的超赞 CTF 工具箱。为所有人准备的工具箱,包含pyc反编译、binwalk、端口扫描、Zip伪加密检测,以及多种加密、编码、Json编辑器和各种实用工具。"
},
{
name: "keywords",
content:
"CTF,CTFever,CTF Toolkit,CTF Toolkit by uniiem,进制,在线工具,古典密码,凯撒密码,哈希,反编译,URL 编码,栅栏密码,猪圈密码,摩斯密码,Morse Code,MD5,BrainFuck,端口扫描,Port Scan,时间戳,Timestamp,Base64,ROT-13,pyc decompiler,pyc 反编译,IP,伪加密,数据存储格式转换",
},
{title: "format-detection", content: "telephone=no"},
{name: "apple-mobile-web-app-capable", content: "yes"},
{name: "msapplication-TileColor", content: "#2b5797"}
],
link: [
{
rel: "apple-touch-icon",
sizes: "180x180",
href: "/apple-touch-icon.png"
},
{
rel: "icon",
type: "image/png",
sizes: "32x32",
href: "/favicon-32x32.png"
},
{
rel: "icon",
type: "image/png",
sizes: "16x16",
href: "/favicon-16x16.png"
},
// {rel: 'manifest', href: '/site.webmanifest'},
{rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#5bbad5"},
// Preloads
{rel: "preconnect", href: "//analytics.i0x0i.ltd"},
{
rel: "preload",
href: "//fonts.font.im/css?family=PT+Mono|PT+Sans|Poppins|Nunito&display=swap",
as: "font"
}
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
"ant-design-vue/dist/antd.css",
"pattern.css/dist/pattern.css",
"@/assets/css/main.css"
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
"@/plugins/antd-ui",
"@/plugins/g-tag",
"@/plugins/api",
"@/plugins/vue-js-modal"
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
"@nuxt/postcss8",
"@nuxtjs/device"
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
"@nuxtjs/axios",
// https://go.nuxtjs.dev/pwa
"@nuxtjs/pwa",
// https://go.nuxtjs.dev/i18n
"@nuxtjs/i18n",
"@nuxtjs/pwa",
'@nuxtjs/toast',
"@nuxt/content",
[
"nuxt-matomo",
{
matomoUrl: "//analytics.i0x0i.ltd/",
trackerUrl: "//analytics.i0x0i.ltd/matomo.php",
scriptUrl: "//analytics.i0x0i.ltd/matomo.js",
siteId: 5,
debug: false,
onMetaChange: true
}
],
["@nuxtjs/robots", {}],
"@nuxtjs/sitemap",
"@nuxtjs/proxy"
],
// googleAnalytics: {
// id: 'UA-197955373-1'
// },
loading: {
color: 'mediumspringgreen',
continuous: true
},
loadingIndicator: {
name: 'folding-cube',
color: '#81dab4',
background: 'white'
},
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
baseURL: "/",
proxy: true
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
meta: {
name: "CTFever",
author: "Uniiem Studio",
description: "A fantastic toolkit for CTFers and everyone.",
viewport:
"width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no",
theme_color: "#ffffff",
mobileApp: true,
mobileAppIOS: true,
nativeUI: true
},
icon: {
source: "/static/icon.png",
fileName: "icon.png",
sizes: [64, 120, 144, 152, 192, 384, 512],
purpose: "any"
},
workbox: {
workboxURL: "/third_party/workbox/workbox-sw.js",
config: {
modulePathPrefix: "/third_party/workbox/",
debug: process.env.NODE_ENV !== "production"
},
offlineAnalytics: true
},
manifest: {
lang: "zh",
id: "/?standalone=true",
name: "CTFever",
short_name: "CTFever",
description: "A fantastic toolkit for CTFers and everyone by uniiem.",
icons: [
{
src: "/android-chrome-192x192.png",
sizes: "192x192",
type: "image/png"
},
{
src: "/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png"
}
]
}
},
toast: {
position: 'top-center'
},
sitemap: {
hostname: "https://ctfever.uniiem.com",
gzip: true,
defaults: {
lastmod: new Date()
},
i18n: {
locales: ["en", "zh"],
routesNameSeparator: "___"
}
},
proxy: {
'/gateway/': {
// target: process.env.NODE_ENV === 'production' ? 'https://ctfever-service.uniiem.com' : 'http://127.0.0.1:8080',
target: process.env.CEVER_BACKEND_BASE || CEVER_BACKEND_BASE_FALLBACK,
changeOrigin: true,
pathRewrite: {
'^/gateway/': '/'
}
}
},
i18n: {
// https://go.nuxtjs.dev/i18n-module
locales: [
{
code: "en",
iso: "en-US",
file: "en-US.js",
name: "English",
label: "English",
icon: "twemoji:flag-united-kingdom"
},
{
code: "zh",
iso: "zh-CN",
file: "zh-CN.js",
name: "简体中文",
label: "简体中文",
icon: "twemoji:flag-china"
},
// {
// code: 'ja',
// iso: 'ja-JP',
// file: 'ja-JP.js',
// name: '日本語',
// label: '日本語'
// }
],
detectBrowserLanguage: {
useCookie: true,
cookieKey: "i18n_redirected",
// redirectOn: 'root',
alwaysRedirect: true
},
defaultLocale: "zh",
lazy: true,
langDir: "lang/",
vueI18n: {
fallbackLocale: "en",
messages: {
en: require("./lang/en-US.js"),
zh: require("./lang/zh-CN.js")
}
},
vueI18nLoader: true
},
content: {
experimental: {
clientDb: true
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
postcss: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
}
}
};