Skip to content

Commit 61945e3

Browse files
committed
feat: change axios to work on github pages
1 parent 7146a42 commit 61945e3

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

nuxt.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,18 @@ export default {
5050
// Axios module configuration: https://go.nuxtjs.dev/config-axios
5151
axios: {
5252
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
53-
baseURL: 'https://kfu-reg.github.io/database/',
53+
baseURL: '/',
54+
},
55+
publicRuntimeConfig: {
56+
axios: {
57+
browserBaseURL: 'https://kfu-reg.github.io/database/',
58+
},
59+
},
60+
61+
privateRuntimeConfig: {
62+
axios: {
63+
baseURL: process.env.BASE_URL,
64+
},
5465
},
5566

5667
// PWA module configuration: https://go.nuxtjs.dev/pwa

0 commit comments

Comments
 (0)