Cannot use SSL in development with webpack
I brought this up in Slack at https://gitlab.slack.com/archives/C02PF508L/p1585679106117000, and it doesn't seem like anyone else has run into this yet.
As of about the last week, I'm unable to use HTTPS in my development environment (GDK) due to webpack. Javascript simply doesn't work, and I often get errors in the JS console such as:
Uncaught Error: SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS
at new SockJS (sockjs.js?f6ba:689)
at new SockJSClient (SockJSClient.js?0a33:39)
at initSocket (socket.js?e29c:20)
at Object.eval (client?d510:176)
at eval (index.js?http://127.0.0.1:3808:177)
at Object.../../../node_modules/webpack-dev-server/client/index.js?http://127.0.0.1:3808 (main.chunk.js:18142)
at __webpack_require__ (runtime.bundle.js:790)
at fn (runtime.bundle.js:151)
at Object.448 (pages.users.chunk.js:2230)
at __webpack_require__ (runtime.bundle.js:790)
I even attempted to configure webpack with SSL but it appears we don't support that. There was an older issue for this at gitlab-foss#30839 (closed), which seems like some support was added at one point. But there's no exposed configuration option in gitlab.yml
to allow setting https.
Step to reproduce
- Install ngrok (or Nginx)
- Run
ngrok http 3000
- Set the ngrok host, port 443 and https true in
gitlab.yml
. - Start GDK, visit GitLab sign in in the browser and note that you cannot change panes in the sign in window (if you have multiple auth types configured) or if you sign in you'll notice no JS works (no pop out navigation, no downdowns for projects and groups in the top bar, no user dropdown in the top right, etc.
@engwan @mikegreiling Do you have any ideas here? Was this a recent change or am I doing something wrong?
Edited by Drew Blessing