Answers.Body: <p>Currently, no... it's an all or nothing thing and you'll have to disable it globally.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-20T22:17:57.260Z
Answers.LastActivityDate: 2014-06-20T22:17:57.260Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm working on building a post-receive hook and a third party service's attempt to post data to a webhook keeps 302ing to the Craft login page when I attempt to use <code>EmailModel</code> and <code>sendEmail()</code>.</p>
  
  <p>The only thing Craft logs during this failed transaction is a series of errors that read...</p>
  
  <blockquote>
    <p>Someone tried to restore a session from a cookie without presenting an IP address or userAgent string.</p>
  </blockquote>
  
  <p>I noticed the <code>requireUserAgentAndIpForSession</code> setting in <code>UserSessionService-&gt;_checkVitals()</code>, disabled it, and of course the problem went away.</p>
  
  <p>I'd prefer not to disable this setting in general—is there a way to programmatically unrequire it for a specific plugin receiving posts?</p>
  
Tags: <plugin-development><security>
Title: Is it possible to disable `requireUserAgentAndIpForSession` for specific instances?
ThreadText: # Is it possible to disable `requireUserAgentAndIpForSession` for specific instances?
  
  (Asked by: username_0 on 2014-06-20)
  
  I'm working on building a post-receive hook and a third party service's attempt to post data to a webhook keeps 302ing to the Craft login page when I attempt to use `EmailModel` and `sendEmail()`.
  
  The only thing Craft logs during this failed transaction is a series of errors that read...
  
  > Someone tried to restore a session from a cookie without presenting an IP address or userAgent string.
  
  I noticed the `requireUserAgentAndIpForSession` setting in `UserSessionService->_checkVitals()`, disabled it, and of course the problem went away.
  
  I'd prefer not to disable this setting in general—is there a way to programmatically unrequire it for a specific plugin receiving posts?
  
  **Tags:** plugin-development, security
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-06-20. Score: 1 | Accepted answer
  
  Currently, no... it's an all or nothing thing and you'll have to disable it globally.
  
  
  ---
  
  