Skip to content

Instantly share code, notes, and snippets.

@mattlenz
Last active August 11, 2019 16:50
Show Gist options
  • Save mattlenz/dfabc78cab0f84d2d94731a700d094bb to your computer and use it in GitHub Desktop.
Save mattlenz/dfabc78cab0f84d2d94731a700d094bb to your computer and use it in GitHub Desktop.
Kirby Nuxt
KIRBY_URL=http://localhost:8888
KIRBY_USERNAME=
KIRBY_PASSWORD=
<?php
return [
'api' => [
'basicAuth' => true,
'allowInsecure' => true
]
];
?>
require('dotenv').config()
module.exports = {
env: {
KIRBY_URL: process.env.KIRBY_URL
},
modules: [
'@nuxtjs/axios',
'@nuxtjs/proxy'
],
proxy: {
'/api': {
target: process.env.KIRBY_URL,
auth: [process.env.KIRBY_USERNAME, process.env.KIRBY_PASSWORD].join(':')
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment