Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy is stripping cache headers #122

Open
ProTip opened this issue Jul 6, 2024 · 1 comment
Open

Proxy is stripping cache headers #122

ProTip opened this issue Jul 6, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ProTip
Copy link

ProTip commented Jul 6, 2024

This is a really awesome project; thanks for creating!

Currently the proxy strategy results in stripping Vite dev server response headers. Vite uses caching/etags heavily to boost page load performance, and so there is quite a hit in performance with the headers missing(1.2s vs 150ms in my current app). Without the headers Chrome re-fetches all the source files on page load, and the V8 compilation cache is never used.

For now I'm pointing the scripts in index.html directly to the Vite server, and have the origin configured so it serves assets pointing back to itself. This appears to be working fine for now and is resulting in properly cached assets.

I'm wondering if something like YARP could help wrangle some of the proxy logic.

@ProTip ProTip added the bug Something isn't working label Jul 6, 2024
@Eptagone Eptagone added the help wanted Extra attention is needed label Sep 1, 2024
@nekosaur
Copy link

@ProTip could you go into more detail how you've set up the index.html file and origin to make this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants