code: def update_redirect(self):
          
          page_history = Stack(session.get("page_history", []))
          page_history.push(request.url)
          session["page_history"] = page_history.to_json()
docs: Call it on your own endpoint's to update the back history navigation.
              If you bypass it, the next submit or back will go over it.