Added support for reverse proxy and routing managed by vue

Use --locationbase to specify the path used by the reverse proxy
Updated deezer-js to 1.3.8
This commit is contained in:
RemixDev
2022-07-30 00:23:48 +02:00
parent 2a32e772dd
commit cb8ab5cfae
7 changed files with 53 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import deleteEndpoints from './delete'
import postEndpoints from './post'
import patchEndpoints from './patch'
const prependApiPath = (path: string) => `/api${path}`
const prependApiPath = (path: string) => `*/api${path}`
interface Method {
method: string
@@ -40,7 +40,7 @@ export function registerApis(app: Application) {
})
// Fallback, for SPA mode
app.get('*', (_, res) => {
res.redirect('/')
app.get('*/api*', (_, res) => {
res.send({ error: "API endpoint doesn't exist" })
})
}