Skip to content

Commit 4b8238c

Browse files
jakeparisJake Paris
andauthored
Fix error when WordPress is multisite, fixes #80 (#81)
Co-authored-by: Jake Paris <[email protected]>
1 parent e2d0496 commit 4b8238c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

browser-sync.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
let docroot = process.env.DDEV_DOCROOT;
33
let filesdir = process.env.DDEV_FILES_DIR;
44
let url = process.env.DDEV_HOSTNAME;
5+
let nonSslUrl = process.env.DDEV_PRIMARY_URL.replace( /^https:/, 'http:' )
56

67
if (filesdir === "") {
78
filesdir = null
@@ -15,7 +16,7 @@ module.exports = {
1516
ui: false,
1617
server: false,
1718
proxy: {
18-
target: "localhost"
19+
target: nonSslUrl
1920
},
2021
host: url,
2122
}

0 commit comments

Comments
 (0)