wp-webpack-script
wp-webpack-script copied to clipboard
Local SSL
When I visit my wpack.io server is running at http://172.16.14.133:3000 it doesn't work, I have to append https://172.16.14.133:3000 - is there a way to have it display the secure url by default?
Hi,
What is the value of your proxy? Please paste here the relevant content of wpackio.server.js file.
module.exports = {
// Your LAN IP or host where you would want the live server
// Override this if you know your correct external IP (LAN)
// Otherwise, the system will always use localhost and will not
// work for external IP.
// This will also create some issues with file watching because for
// some reason, service-worker doesn't work on localhost?
// https://github.com/BrowserSync/browser-sync/issues/1295
// So it is recommended to change this to your LAN IP.
// If you intend to access it from your LAN (probably do?)
// If you keep null, then wpackio-scripts will try to determine your LAN IP
// on it's own, which might not always be satisfying. But it is in most cases.
host: undefined,
// Your WordPress development server address
// This is super important
proxy: 'https://wordpress.test',
// PORT on your localhost where you would want live server to hook
port: 3000,
// UI passed directly to browsersync
ui: {
port: 3001,
},
// Whether to show the "BrowserSync Connected"
notify: false,
// Open the local URL, set to false to disable
open: true,
// BrowserSync ghostMode, set to false to completely disable
ghostMode: {
clicks: true,
scroll: true,
forms: true,
},
// Override system calculated public path of the `dist` directory
// This must have forward slash, otherwise it will not work.
distPublicPath: undefined,
};
Looks like a bug in the tooling. I will take a look. Thanks for the report.
You're welcome
Same here!
Any news for a fix?
This could be a simple fix in the tooling. Check if the proxy URL is SSL and if so, print https URL in the console. I will keep this open for now and accept PR to fix this.