shunter
shunter copied to clipboard
Add https support
https://github.com/springernature/shunter/pull/112 added support for surfacing the protocol of the --route-override
route, defaulting to http:
.
As inspired by @moddular's comment on the PR:
With the http/https bit it doesn't seem to change anything in lib/processor.js where the proxy target is created:
route.target = 'http://' + route.host + (route.port ? ':' + route.port : '');
Should this maybe return the scheme too so that could be used here (with a default of http)?
So with the protocol now being exposed, we could potentially add support for https:
by adding a little logic to the route.target
definition. As far as I can see this would require the following changes:
- [ ] Support for defining the protocol in the routes config file
- [x] Support for defining the protocol via
--route-override
- [ ] Updating the
route.target
logic to allow changing of the protocol, defaulting tohttp:
- [ ] Investigating the impact of using
https
and if there are further changes required in order to fully support it. (Encryption etc).
This is something we'd like to do, but we're waiting for a practical application so that we can test it all works as expected. At the moment all our use of Shunter uses http internally.
Am I missing something, or does it work now? https://journalsuggester.springer.com/
nvm I am missing something, using it internally. Sorry!
Self-assigning as we may need to add this ourselves for a project here at work.