title: How to know if an Azure function is running in a slot
body: <p>Can a function know if it's running in a slot?</p>
  <p>I would like to prevent a function to be executed if in &quot;staging&quot; slot.</p>
  <blockquote>
  <p><strong>Updated</strong></p>
  <p>Base on the answer from Bruce (thanks again buddy), I wrote that blog post <a href="http://www.frankysnotes.com/2017/09/how-to-know-when-azure-function-is.html" rel="nofollow noreferrer">http://www.frankysnotes.com/2017/09/how-to-know-when-azure-function-is.html</a></p>
  </blockquote>