fix carplace page
Build & Deploy / Build & Push Docker Image (push) Successful in 3m16s
Test / Type Check (all packages) (push) Successful in 53s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 56s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Carplace Unit Tests (push) Successful in 40s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 41s
Test / API Integration Tests (push) Successful in 1m0s
Build & Deploy / Build & Push Docker Image (push) Successful in 3m16s
Test / Type Check (all packages) (push) Successful in 53s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 56s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Carplace Unit Tests (push) Successful in 40s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 41s
Test / API Integration Tests (push) Successful in 1m0s
This commit is contained in:
@@ -3,8 +3,15 @@
|
||||
const { buildSecurityHeaders, normalizeAssetPrefix } = require('../../config/nextSecurityHeaders')
|
||||
|
||||
const CARPLACE_ASSET_PREFIX = '/carplace'
|
||||
// In local development the homepage app serves /carplace from port 3000 while
|
||||
// the Carplace dev server runs on port 3004. Emit absolute chunk/HMR URLs so
|
||||
// the browser asks the Carplace server for its own assets instead of the
|
||||
// homepage server.
|
||||
const defaultCarplaceAssetPrefix = process.env.NODE_ENV !== 'production'
|
||||
? 'http://localhost:3004'
|
||||
: CARPLACE_ASSET_PREFIX
|
||||
const carplaceAssetPrefix = normalizeAssetPrefix(
|
||||
process.env.CARPLACE_ASSET_PREFIX ?? (process.env.NODE_ENV === 'production' ? CARPLACE_ASSET_PREFIX : undefined),
|
||||
process.env.CARPLACE_ASSET_PREFIX ?? defaultCarplaceAssetPrefix,
|
||||
CARPLACE_ASSET_PREFIX,
|
||||
)
|
||||
const securityHeaders = buildSecurityHeaders({ assetSources: [carplaceAssetPrefix] })
|
||||
|
||||
Reference in New Issue
Block a user