-
Notifications
You must be signed in to change notification settings - Fork 6
/
nuxt.config.js
215 lines (213 loc) · 6.65 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
export default {
/*
** Headers of the page
*/
head: {
titleTemplate: '%s - SEARCCH Hub ',
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
},
// Twitter Card Meta
// Doc: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started.html
{ property: 'twitter:card', content: 'summary' },
{ property: 'twitter:site', value: '@SEARCCH_HUB' },
{ property: 'twitter:creator', value: '@timyardley' },
// OpenGraph Meta
// Doc: http://ogp.me/
{
property: 'og:url',
content: 'https://hub.cyberexperimentation.org/'
},
{ property: 'og:type', content: 'website' },
{
property: 'og:title',
content: 'SEARCCH Hub for Cyber Security Artifacts'
},
{
property: 'og:description',
content:
'SEARCCH: Sharing Expertise and Artifacts for Reuse through a Cybersecurity Community Hub. SEARCCH is creating a collaborative, community-driven platform that lowers the barrier to sharing by aiding researchers in packaging, importing, locating, understanding, and reusing experiment artifacts. The artifacts organized by the platform, including tools, methodologies, documentation, and data, can be deployed to community testbeds for performing new experiments. Concurrently, SEARCCH engages in outreach activities to build an active, diverse, online community around the hub to enable direct sharing of expertise and crowdsourcing research ideas and experiment design. Through a process of continuous learning and improvement, the hub will grow over time to include collections of artifacts covering a broad range of cybersecurity research topics and add support for newly identified community needs. These activities together will transform the way cybersecurity research is conducted in the cybersecurity community, improving the overall scientific quality of cybersecurity research through validation, repeatable sharing and reuse, and a collective approach to building on research results.'
},
{
property: 'og:image',
content: 'https://hub.cyberexperimentation.org/images/horiz-tagline.png'
},
{ property: 'og:image:width', content: 433 },
{ property: 'og:image:height', content: 138 },
{ property: 'og:image:type', content: 'image/png' },
{ property: 'og:image:alt', content: 'SEARCCH Logo' }
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
serverMiddleware: ['~/servermiddleware/seo.js'],
/*
** Customize the progress-bar color
*/
loading: { color: '#000' },
/*
** Global CSS
*/
css: ['~/assets/main.css'],
/*
** Plugins to load before mounting the App
*/
plugins: [
'~/plugins/filters',
'~/plugins/vue2-filters',
'~/plugins/repository',
'~/plugins/base',
'~/plugins/chartist',
'~/plugins/components',
'~/plugins/sanitize',
'~/plugins/moment',
'~/plugins/markdown'
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxtjs/vuetify',
[
'@nuxtjs/google-analytics',
{
id: 'UA-165120903-1'
}
]
],
/* uncomment this only for development testing
googleAnalytics: {
debug: {
enabled: true,
sendHitTask: true
}
},
*/
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/auth',
'@nuxtjs/proxy',
[
'@dansmaculotte/nuxt-security',
{
/* module options */
dev: true,
hsts: {
maxAge: 15552000,
includeSubDomains: true,
preload: true
},
csp: {
directives: {
defaultSrc: ["'self'"],
scriptSrc: [
"'self' 'unsafe-eval' 'unsafe-inline' https://www.google-analytics.com"
],
objectSrc: ["'self'"],
styleSrc: [
"'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net"
],
fontSrc: [
"'self' data: https://fonts.gstatic.com https://cdn.jsdelivr.net"
],
connectSrc: [
"'self' https://api.github.com https://www.gravatar.com"
],
// asterisk here due to badge images
imgSrc: [
"'self' https://avatars.githubusercontent.com https://*.gravatar.com *"
]
},
reportOnly: false
},
referrer: 'same-origin',
securityFile: {
contacts: ['mailto:[email protected]'],
canonical:
'https://hub.cyberexperimentation.org/.well-know/security.txt',
preferredLanguages: ['en']
},
additionalHeaders: true
}
]
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
proxy: true
},
proxy: {
'/kg/': {
target: process.env.BACKEND_URL
? process.env.BACKEND_URL
: process.env.PRODUCTION == 'true'
? 'https://hub-api.cyberexperimentation.org/v1' // production backend
: 'https://hub-dev-api.cyberexperimentation.org/v1', // development backend
pathRewrite: { '^/kg/': '/' },
headers: {
'X-Api-Key':
process.env.PRODUCTION == 'true'
? process.env.KG_API_KEY
: process.env.KG_DEV_API_KEY
},
changeOrigin: true
},
'/avatar/': { target: 'https://www.gravatar.com/' }
},
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
dark: false,
themes: {
light: {
primary: '#00476B',
accent: '#6D6E71',
secondary: '#395C23'
}
}
}
},
publicRuntimeConfig: {},
privateRuntimeConfig: {
gitHubClientID: process.env.GITHUB_CLIENT_ID || 'undefined',
gitHubClientSecret: process.env.GITHUB_CLIENT_SECRET || 'undefined'
},
/*
** Build configuration
*/
build: {
extractCSS: true,
extend(config, ctx) {},
transpile: [/^vuetify/]
},
router: {
// middleware: 'auth',
mode: 'history'
},
auth: {
strategies: {
local: false,
github: {
client_id: process.env.GITHUB_CLIENT_ID,
client_secret: process.env.GITHUB_CLIENT_SECRET,
scope: ['read:user', 'user:email']
}
},
plugins: ['~/plugins/auth.js', '~/plugins/axios.js']
}
}