You get a bonus - 1 coin for daily activity. Now you have 1 coin

How to disable the redirect to the last previous url after authorization in Symfony

Practice




how do I disable the redirect to the last previous url after authorization in symfony?

in the file appconfigsecurity.yml


security:
providers:
fos_userbundle:
id: fos_user.user_provider.username

encoders:
FOSUserBundleModelUserInterface: sha512

firewalls:
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_provider: form.csrf_provider

# submit the login form here
check_path: /login_check

# the user is redirected here when he/she needs to login
login_path: /login

# if true, forward the user to the login form instead of redirecting
use_forward: false

# login success redirecting options (read further below)
always_use_default_target_path: true
default_target_path: /
target_path_parameter: _target_path
use_referer: false


logout: true
anonymous: true

......

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)