Eric T
Eric T

Reputation: 1026

Symfony Session on module

Generally when I try to search for the solution they direct me to security.yml in the config folder. But whenever I change it to my module name lets says "user"

user:
    is_secure: true

it doesn't work while....

all:
    is_secure: true

locked up all the page so what should I do to handling on specific modules or files if possible. Thanks for the valuable time and comment.

Edit:

My path

<!-- apps/frontend/modules/user -->

originally under user folder doesn't have config folder...

Upvotes: 0

Views: 223

Answers (1)

Pabloks
Pabloks

Reputation: 1484

If you want to secure an specific module you have to define it in its config folder at security.yml file (like you said but in the desire module). For example, if I have a clients module with index, new, create, etc actions and want to secure the new and create actions, you have to add to the

<!-- /app_name/modules/clients/config/security.yml -->
new:
  is_secure: true
  credentials: [...] //if you defined credentials

create:
  is_secure: true
  credentials: [...] //if you defined credentials

If you want to secure all clients module just set

<!-- /app_name/modules/clients/config/security.yml -->
all:
  is_secure: true

Upvotes: 1

Related Questions