Add headerRedirect option #1
Загрузка…
x
Ссылка в новой задаче
Block a user
Описание отсутствует.
Удалить ветку «:master»
Удаление ветки необратимо. Несмотря на то, что удаленная ветка может просуществовать некоторое время перед тем, как она будет окончательно удалена, это действие НЕВОЗМОЖНО отменить в большинстве случаев. Продолжить?
Testна Add headerRedirect optionI propose that there be a
headerRedirectoption in case someone wants to use header redirects.I respect your assertion that meta redirect is the best choice. I just think we should have the option in greenlock-express.
It would work something like this:
... or ...
The readme could be updated to say more broadly that this repository is for HTTPS redirect, not just HTTPS redirect using meta.
The documentation should still explain why meta is better in the opinion of the author, citing the blog post, but will offer header as an option and provide a usage example to that end.
A nit! A nit! I have a nit!
res.redirectonly works in express. It won't work in other frameworks like koa, hapi, rill, etc.Also, for reasons that I don't remember you do need to have a certain minimum number of bytes in the body of a redirect (which express probably does automatically).
I think this is what we need:
Would you mind updating and testing?
I don't mind. I will.
I think this is a working PR now. I tried and failed to write a test. You may have to write it for me.