Proxify API requests in Vue's devServer

This commit is contained in:
Jérôme Lebleu
2021-07-12 18:13:42 +02:00
parent 2a9f9fac0e
commit 12c1a0012f
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
{
"API_BASE_URL": "http://localhost:8000/api/v2"
"API_BASE_URL": "/api/v2/"
}
+7
View File
@@ -1,4 +1,11 @@
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8000/'
}
}
},
transpileDependencies: [
'vuetify'
]