[Python] Flask error related with SERVER_NAME after upgrading Flask to 3.1.0

Discussão em 'Python' iniciado por Stack, Novembro 28, 2024.

  1. Stack

    Stack Membro Participativo

    My application uses subdomains (every logged user has his own: user.domain.com) and Blueprints with no subdomains.

    Till now I didn't set subdomain_matching and I set SERVER_NAME = "domain.com" and SESSION_COOKIE_DOMAIN = ".domain.com".

    After upgrading to Flask 3.1.0 from 3.0.3 the application is not working anymore and every url is requested gets 404 error (but error page is correctly loaded).

    If I delete the "subdomain" parameter from routes, then www.domain.com is working but I can't get username.domain.com.

    I see in Flask documentation "Changes" section that something has changed in 3.1.0 about SERVER_NAME, but I can't understand, either reading #5553, how this parameter has to be set in order to have subdomains working with blueprints (no blueprint subdomain).

    Continue reading...

Compartilhe esta Página