|
@@ -46,14 +46,22 @@ export default {
|
|
|
*/
|
|
|
modules: [
|
|
|
// Doc: https://axios.nuxtjs.org/usage
|
|
|
- '@nuxtjs/axios'
|
|
|
+ '@nuxtjs/axios',
|
|
|
+ '@nuxtjs/proxy'
|
|
|
],
|
|
|
/*
|
|
|
** Axios module configuration
|
|
|
** See https://axios.nuxtjs.org/options
|
|
|
*/
|
|
|
axios: {
|
|
|
- credentials: true
|
|
|
+ credentials: true,
|
|
|
+ proxy: true
|
|
|
+ },
|
|
|
+ proxy: {
|
|
|
+ '/api/': {
|
|
|
+ target: 'https://newsapi.org/v2/',
|
|
|
+ pathRewrite: { '^/api/': '' }
|
|
|
+ }
|
|
|
},
|
|
|
env: {
|
|
|
NEWS_API_KEY: '2d199fb5095b44869cb4311a7a0366d2'
|