diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 6c3f0e3c7..e368a2b6f 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -61,7 +61,7 @@ jobs: env: DISABLE_ESLINT_PLUGIN: true run: | - npm start & npx wait-on http://localhost:3000 + npm start & npx wait-on http://localhost:3000 --verbose # Build the Docker image - name: Build run: | diff --git a/vite.config.js b/vite.config.js index a743cec3a..b3c09cbd5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -10,6 +10,20 @@ const bigQueryApi = 'https://bigquery.googleapis.com'; const googleSheetsApi = 'https://sheets.googleapis.com'; const driveApi = 'https://www.googleapis.com'; +function fixAcceptHeader404() { + return { + name: 'fix-accept-header-404', // issue with vite dev server: https://github.com/vitejs/vite/issues/9520 + configureServer(server) { + server.middlewares.use((req, _res, next) => { + if (req.headers.accept == 'application/json, text/plain, */*') { + req.headers.accept = '*/*'; + } + next(); + }); + }, + }; +} + dns.setDefaultResultOrder('verbatim'); export default defineConfig({ @@ -29,6 +43,7 @@ export default defineConfig({ svgr(), tsconfigPaths(), eslint(), + fixAcceptHeader404(), ], server: { port: 3000,