コード例 #1
0
ファイル: helpers.py プロジェクト: devoidfury/WSGIFire
def redirect(location):
    """
    Return a `Response` with temporary redirect code (302) and forward to `location`.
    """
    response = Response()
    response.status_code = 302
    response.headers["Location"] = location
    return response
コード例 #2
0
ファイル: helpers.py プロジェクト: devoidfury/WSGIFire
def permanent_redirect(location):
    """
    Return a `Response` with permanent redirect code (301) and forward to `location`.
    """
    response = Response()
    response.status_code = 301
    response.headers["Location"] = location
    return response