title: Raise 404 if Flask catch-all route starts with prefix
body: <p>I am using the catch-all url pattern in my Flask route. I want the view to ignore (throw a 404 error) any path that starts with <code>/api</code>. How can I do this?</p>
  
  <pre><code>@app.route('/', defaults={'path': ''})
  @app.route('/&lt;path:path&gt;')
  def index(path):
      return 'Hello, World!'
  </code></pre>