I can redirect the user, it works but it has 302 status, how I can redirect a user and add 301 so it will be permanent redirect?
302
301
request.redirect('/dashboard')
You can add the status you need as a status parameter:
status
request.redirect('/dashboard', status=301)
If using Masonite 2.2+ you can also create a Redirect route:
Redirect
from masonite.routes import Redirect ROUTES = [ Redirect('/from', '/to', status=301) ]
You can add the status you need as a
statusparameter:If using Masonite 2.2+ you can also create a
Redirectroute: