Skip to content

Proxy prefix making it acessing API error layout instead nuxt error layout #618

Open
@DhikaArtwards

Description

@DhikaArtwards

i have proxy configuration like this
proxy: { '/api': { target: process.env.BASE_URL, pathRewrite: { '^/api/': '' }, changeOrigin: true, onProxyReq(request) { request.setHeader('origin', process.env.BASE_URL) } } },

base url value is something.com/api
and the code when fetching something like this
.get('/api/seo_metas'

when im accessing url localhost:3000/api/ it return API 404 error message layout instead the nuxt one, is this expected behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions