
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
vite-plugin-h2-proxy
Advanced tools
đź’Ą A vite plugin that resolve the conflict between http2 and proxy
đź’Ą A vite plugin that resolve the conflict between http2 and proxy
yarn add vite-plugin-h2-proxy -D
# or
npm i vite-plugin-h2-proxy -D
# or
pnpm i vite-plugin-h2-proxy -D
In your vite.config.ts:
import { defineConfig } from 'vite'
import vitePluginH2Proxy from 'vite-plugin-h2-proxy'
const _proxy = {
target: 'http://localhost:8080',
proxyTimeout: 5000,
timeout: 5000,
rewrite: (path) => path.replace(/^\/fallback/, ''),
onReq(req, proxyReq) {
proxyReq.headers.origin = 'http://localhost:8080'
}
onRes(req, res, proxyRes){
res.setHeader('set-cookie', proxyRes.headers['set-cookie'] + '; SameSite=None; Secure')
}
onError(error){
console.log(error)
}
bypass() {
return false
}
}
export default defineConfig({
plugins: [vitePluginH2Proxy(_proxy)],
})
interface ProxyOptions {
ws?: boolean
target: string
proxyTimeout?: number
proxyName?: string
timeout?: number
bypass?: (...args: any) => boolean
rewrite?: (path: string) => string
onReq?: (...args: any) => any
onRes?: (...args: any) => any
onError?: (e: Error) => void
}
vitePluginH2Proxy(_proxy, true)
The configuration of proxy item are highly compatible with vite's built-in
options of proxy, except configure option.
Extends http2-proxy. Additional options: onError
FAQs
đź’Ą A vite plugin that resolve the conflict between http2 and proxy
The npm package vite-plugin-h2-proxy receives a total of 89 weekly downloads. As such, vite-plugin-h2-proxy popularity was classified as not popular.
We found that vite-plugin-h2-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.