Skip to content

Commit bbedd4e

Browse files
committed
Revert "fix(dev): proxy URL for https targets + disable auto-open by default"
This reverts commit b0de564.
1 parent b0de564 commit bbedd4e

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

proxy.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ const proxySettingMiddleware: Connect.NextHandleFunction = (req, res) => {
5757
};
5858

5959
const proxyHandlerMiddle: Connect.NextHandleFunction = (req, res) => {
60-
const path = req.url ?? '';
61-
/** Browser fetch becomes GET /https://host/... — must not use `https:` + path (breaks URL). */
62-
const rawUrl =
63-
path.startsWith('/https://') || path.startsWith('/http://')
64-
? path.slice(1)
65-
: `https:${path}`;
60+
const rawUrl = 'https:' + req.url;
6661
if (req.headers['access-control-request-method']) {
6762
res.setHeader(
6863
'access-control-allow-methods',

vite.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default defineConfig({
3131
},
3232
server: {
3333
port: 3000,
34-
// Opt-in: avoids `spawn xdg-open ENOENT` on minimal Linux; open http://localhost:3000 manually.
35-
open: process.env.VITE_OPEN === '1' || process.env.VITE_OPEN === 'true',
34+
open: true,
3635
},
3736
});

0 commit comments

Comments
 (0)