Skip to content

Commit

Permalink
fix: Load dev files from localhost, not 127.0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Jun 26, 2023
1 parent 883460d commit eab8832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function hmrRewritePlugin(config: {
server: {
hmr: {
protocol: "http:",
host: "127.0.0.1",
host: "localhost",
port: 5173,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function manifestLoaderPlugin(options: ResolvedOptions): vite.Plugin {
// Set the server origin so assets contain the entire url in dev mode, not just the
// absolute path. See #79. This does not effect scripts or links. They are updated
// manually in the hmr-rewrite-plugin
origin: "http://127.0.0.1:5173",
origin: "http://localhost:5173",
},
build: {
// Since this plugin schedules multiple builds, we can't let any of the builds empty the
Expand Down Expand Up @@ -316,7 +316,7 @@ async function applyDevServerCsp(manifest: Manifest) {
: manifest.content_security_policy ??
"script-src 'self'; object-src 'self';" // default CSP for MV2
);
csp.add("script-src", "http://localhost:*", "http://127.0.0.1:*");
csp.add("script-src", "http://localhost:*");

if (manifest.manifest_version === 3) {
manifest.content_security_policy ??= {};
Expand Down

0 comments on commit eab8832

Please sign in to comment.