mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 07:28:09 -05:00
feat: add optional CDN URL configuration for static assets in Vite
This commit is contained in:
@@ -29,7 +29,14 @@ export default defineConfig(({ mode }) => {
|
||||
"0.0.1"
|
||||
).replaceAll(".", "-");
|
||||
|
||||
// Optional CDN URL for static assets (e.g., https://cdn.example.com)
|
||||
// When set, all static assets will be served from this URL instead of the same origin.
|
||||
// This is useful for serving assets from a CDN subdomain while keeping API calls on the main domain.
|
||||
// If not set, assets are served from the same origin (backward compatible).
|
||||
const cdnUrl = env.VITE_CDN_URL || "";
|
||||
|
||||
return {
|
||||
base: cdnUrl || "/",
|
||||
server: {
|
||||
allowedHosts,
|
||||
host: true,
|
||||
|
||||
Reference in New Issue
Block a user