A
A
aial2017-07-13 10:07:20
ubuntu
aial, 2017-07-13 10:07:20

Is it possible to use a port in flask when reditect?

I launched the site in ubuntu server 14.04
using apache 80
nginx port 8080
I launched the site in nginx and when redirecting "/" it refers to port 80, otherwise it works on port 8080.
flask code example

@app.route('/logout')
def logout():
    # удалить из сессии имя пользователя, если оно там есть
    session.pop('email', None)
    return redirect('/')

569aaf5b4ad44488ab755a9d3c43e9e3.PNG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pcdesign, 2017-07-13
@aial

return redirect('/:8080')
And so it works?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question