Skip to content

Commit

Permalink
Exclude "/api/*" from navigation fallback, set baseURL for axios to "…
Browse files Browse the repository at this point in the history
…/api"
  • Loading branch information
rubenriseld committed May 21, 2024
1 parent d08c555 commit c33c9eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Gallery.Web/public/staticwebapp.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"navigationFallback": {
"rewrite": "/index.html",
"exclude": [
"*.{css, svg, js, ts, png, jpeg, jpg, ico}"
"*.{css, svg, js, ts, png, jpeg, jpg, ico}",
"/api/*"
]
}
}
2 changes: 1 addition & 1 deletion Gallery.Web/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from 'axios'
import { useRouter } from 'vue-router'

const api = axios.create({
baseURL: import.meta.env.VITE_API_URL,
baseURL: "/api/",
headers: {
'Content-Type': 'application/json',
},
Expand Down

0 comments on commit c33c9eb

Please sign in to comment.