Advertisement
Guest User

Untitled

a guest
Nov 24th, 2020
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. class AuthMiddleware:
  2.     def __init__(self, app):
  3.         self.app = app
  4.  
  5.     def __call__(self, environ, start_response):
  6.         # status = "301 Moved Permanently"
  7.         # headers = [('Location', 'http://localhost:4455?next')]
  8.         #
  9.         # start_response(status, headers)
  10.  
  11.         redirect(url_for('http://localhost:4455', next='http://0.0.0.0:5000'))
  12.  
  13.         return self.app(environ, start_response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement