Skip to content

Support HTTP2 and Proxy at the same time? #4184

@williamyorkl

Description

@williamyorkl

Clear and concise description of the problem

Hi there, is there any way that I can turn on the https and proxy options on vite.config.js at the same time ? Because I want to use http2 and proxy...

Because as what vite officially in the document states that if the proxy option is on, then it will downgrade and TSL only, which mean it will lose http2 function..

image

Suggested solution

as I have tried some ways, but it all seem fails....
use http-proxy-middleware and create a middleware proxy,using the configreServer API that vite provide, then I could turn on https option in vite.config.js, but it seems that it wouldn't work, because I am facing this error....

http-party/node-http-proxy#1237

Highly appreciated if there is a workaround...

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance related enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions