title: Abort 404 not working in flask after request
body: <p>I have a multi domain website with flask but I want to restrict access to all views and blueprints except those I allowed access to them in some domains. So I decided to use flask after request decorator to do that but the problem is abort is not working in flask after request. What is the problem?</p>
  
  <p>This is my sample code:</p>
  
  <pre><code>@app.after_request
  def restricted_access(response):
      if g.site == 'store':
          return abort(404)
      return response
  </code></pre>