-
Notifications
You must be signed in to change notification settings - Fork 81
Add HTTPS option specific for manifest load #42
base: master
Are you sure you want to change the base?
Conversation
Similar to the other manifest options (host + port), we should be able to specify the protocol for serving the manifest file. This is helpful for allowing the server be proxied via HTTPS but still run the dev server via HTTP.
Something to consider as well: it seems the assets will most likely need to be served in whichever protocol the rails serves its own assets -- which means the manifest needs to be served on the same protocol. However, assets can be proxied between HTTPS <-> HTTP via, say, nginx. In the current state of webpack-rails, the assets protocol and manifest protocol needs to be specified because the assets view helper always returns the full url (with the protocol). However, if that can be configured (since a protocol-less url will inherit the container protocol (hopefully?)), then having different specified protocols is not needed. The webpack dev server can run in HTTP: the assets will inherit HTTPS from the container but that request is proxied to HTTP, and the manifest file can be served regularly as HTTP. Unfortunately, I haven't really tested this idea yet. Might also fork and see if it can play out well (though currently using this fork). |
But still raise if webpack failed to bundle
Only fail if webpack actually failed to build modules
Can we get some input on these changes? Being able to specify a different protocol makes sense to our application. The rails server does not need HTTPS but our clients (browsers) do need HTTPS. We're also happy to keep our fork but I think it'll be benificial for others. |
I'm struggling to understand the requirement here, along with the other pull requests regarding HTTPS - what is your use case that https is a development (rather than production) requirement? |
Our rails application runs in HTTPS for development and production (and it is something that will most likely not change in the near future). This allows our development environment to mimic production. |
Conflicts: lib/webpack/rails/manifest.rb
Merge in latest from mipearson/webpack-rails
Similar to the other manifest options (host + port), we should be able to specify the protocol for serving the manifest file. This is helpful for allowing the server be proxied via HTTPS but still run the dev server via HTTP.