wp-webpack-script icon indicating copy to clipboard operation
wp-webpack-script copied to clipboard

Local SSL

Open simplenotezy opened this issue 5 years ago • 7 comments

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?

simplenotezy avatar Dec 27 '19 13:12 simplenotezy

Hi,

What is the value of your proxy? Please paste here the relevant content of wpackio.server.js file.

swashata avatar Dec 28 '19 14:12 swashata

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,
};

simplenotezy avatar Jan 09 '20 11:01 simplenotezy

Looks like a bug in the tooling. I will take a look. Thanks for the report.

swashata avatar Jan 10 '20 07:01 swashata

You're welcome

simplenotezy avatar Jan 10 '20 08:01 simplenotezy

Same here!

ascaroit avatar Nov 02 '20 00:11 ascaroit

Any news for a fix?

vaskou avatar Dec 23 '20 06:12 vaskou

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.

swashata avatar Dec 23 '20 06:12 swashata