Major refactoring to include frontend...
This commit is contained in:
@@ -7,7 +7,10 @@ api_platform:
|
||||
mime_types: ['application/json']
|
||||
jsonld:
|
||||
mime_types: ['application/ld+json']
|
||||
html:
|
||||
mime_types: ['text/html']
|
||||
defaults:
|
||||
stateless: true
|
||||
stateless: false
|
||||
cache_headers:
|
||||
vary: ['Content-Type', 'Authorization', 'Origin']
|
||||
|
||||
|
||||
11
config/packages/asset_mapper.yaml
Normal file
11
config/packages/asset_mapper.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
framework:
|
||||
asset_mapper:
|
||||
# The paths to make available to the asset mapper.
|
||||
paths:
|
||||
- assets/
|
||||
missing_import_mode: ignore
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
asset_mapper:
|
||||
missing_import_mode: warn
|
||||
@@ -14,12 +14,19 @@ security:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
main:
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
enable_csrf: true
|
||||
logout:
|
||||
path: /logout
|
||||
target: app_login
|
||||
lazy: true
|
||||
provider: app_user_provider
|
||||
json_login:
|
||||
check_path: app_login
|
||||
username_path: username
|
||||
password_path: password
|
||||
#json_login:
|
||||
# check_path: app_login
|
||||
# username_path: username
|
||||
# password_path: password
|
||||
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#the-firewall
|
||||
@@ -30,6 +37,8 @@ security:
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
- { path: ^/$, roles: ROLE_USER }
|
||||
- { path: ^/api, roles: ROLE_USER }
|
||||
# - { path: ^/admin, roles: ROLE_ADMIN }
|
||||
# - { path: ^/profile, roles: ROLE_USER }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user