ruby on rails - devise confirmation_url in HTTPS -
My website is completely SSL, so I would also like to generate the URL generated by devise (3.2.2) for e-mail verification It may be that is currently generated by the URL: which produces good URL: I should be url this Apart from this, email verification is currently not working, as NGX operates a redirect for every page equivalent Any clues? You can either specify the protocol in the email template, as you did in your reply, or You can specify this as a default in the mailer. The easiest way to do this, if you are happy to use all the email to https link, then add it to your app config. For example, in your production.rb: In addition, I do not think confirmation_url will be defined directly anywhere. If you try https: // ....
confirmation_url (@resource,: confirmation_token = & Gt;; @ token)
http://example.com/users/confirmation?confirmation_token = ZqfHS35ckLQZscSbsgMm
https://example.com/users/confirmation?confirmation_token=zqfHS35ckLQZscSbsgMm
https , and for some reasons the things get messed up and
https The version is a corrupt URL, such as:
https://example.com/users/confirmation?confirmation_token=zqfHS35ckLQZscSbsgMm?confirmation_token=zqfHS35ckLQZscSbsgMm < P> nginx redirects to this corrupted URL for some reasons, so unicorn requests are not rejected can do.
config.action_mailer.default_url_options = {: protocol = & gt; 'Https' ,: host = & gt; 'Example.com'} I know that if you are going straight to https it does not matter, but after nginx your URL will appear on http to https such as Adding this query is a string for the entire URL, so it would be worth it to decide that it also works in all cases, even if you do not need it for email. If you have a
return 301 in nginx config ?? | If you are using the statement, then there may be a trailing
$ query_string or
$ args for example, if you type
$ request_uri If you are using GET parameter already in it.
rake routes you might see one of them:
user_confirmation GET / users / confirmation (.format) {: controller = & gt; ; Commonly available users_configure_url will be automatically in the form of Helper. I think that by planning again you can allow the use of the confirmation because you are using due diligence of your scope (in this case 'user'), although I have to admit that I have to code Have not seen enough, so that it can be seen how it will know how it works.
Comments
Post a Comment