vite-config-cookie-samesite
v1.0.5
Published
vite proxy config: Allow self-signed. Remove the `Secure` and `SameSite` flags from cookies.
Downloads
3
Readme
vite proxy config: Allow self-signed. Remove the
Secure
andSameSite
flags from cookies.
========================
Usage
import RemoveCookieSameSite from 'vite-config-cookie-samesite';
const viteConfig = defineConfig(() => {
return {
server: {
proxy: { ... RemoveCookieSameSite(env.VITE_API_URL) },
},
};
});
.env
# A slash before https indicates accessing through the vite proxy
VITE_API_URL = '/https://api.example.com'
# Without a slash, indicates direct access without using a proxy
# VITE_API_URL = 'https://api.example.com'