Skip to content

vite模式下,proxy接口返回html #365

Open
@berwin0415

Description

vite模式下,proxy接口返回html

问题描述

配置代理proxy, 期望/api开头请求走代理,但是返回html

请求模拟脚本,Accept较多是复制的浏览器请求

image

config仅修改proxy
image

脚本响应
image

期望

正常响应代理内容

复现仓库

https://github.com/berwin0415/reskript/tree/vite-proxy

vite-proxy 分支showcase/todo内

target-api.sh为模拟请求脚本

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