Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is ssl_requirement clearing the Flash? (Chrome Mac)
    primarykey
    data
    text
    <p>I am using <code>ssl_requirement</code> and since setting it up, my application's Flash messages are disappearing.</p> <p>I've modified the plugin slightly as accounts can optionally have a domain mapped to their account. In that case the non-ssl areas of the site should use the mapped domain, whereas the ssl areas should use the subdomain:</p> <pre><code>def ensure_proper_protocol return true if ssl_allowed? if ssl_required? &amp;&amp; !request.ssl? redirect_to "https://#{@account.subdomain}." + APP_CONF[:domain] + request.request_uri flash.keep return false elsif request.ssl? &amp;&amp; !ssl_required? redirect_to "http://#{@account.sub_or_mapped_domain}" + request.request_uri flash.keep return false end end </code></pre> <p>The application is broadly split into a website (front end) and an admin (back end). <strong>ALL</strong> of the admin area uses SSL so in the AdminController I have overwritten <code>ssl_required?</code> with:</p> <pre><code>protected def ssl_required? return false if RAILS_ENV == "test" || RAILS_ENV == "development" true end </code></pre> <p>Interestingly, Flash messages work fine in the development environment, where I am bypassing requiring SSL, but in my production environment where SSL is required, all Flash are gone.</p> <p>Any ideas?</p> <h2>EDIT</h2> <p>I've done some further testing and can add that this problem is ONLY occurring in Chrome on the Mac. Other Mac browsers and Chrome on windows are displaying the Flash messages as expected.</p> <p>This may be a bug with Chrome on the Mac then...?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload