You are here

public function SecureLoginManager::getRedirectStatus in Secure Login 8

Determines proper redirect status based on request method.

1 call to SecureLoginManager::getRedirectStatus()
SecureLoginManager::secureRedirect in src/SecureLoginManager.php
Redirects a request to the same path on the secure base URL.

File

src/SecureLoginManager.php, line 141

Class

SecureLoginManager
Defines the secure login service.

Namespace

Drupal\securelogin

Code

public function getRedirectStatus() {

  // If necessary, use a 308 redirect to avoid losing POST data.
  return $this->request
    ->isMethodCacheable() ? RedirectResponse::HTTP_MOVED_PERMANENTLY : RedirectResponse::HTTP_PERMANENTLY_REDIRECT;
}