mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Allow shop urls having api prefix
This commit is contained in:
parent
f4990b3049
commit
90674b76b5
3 changed files with 5 additions and 6 deletions
|
|
@ -549,7 +549,7 @@ fos_rest:
|
|||
- { path: "^/(?!admin|api)[^/]++/verify", role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
|
||||
- { path: "^/admin", role: ROLE_ADMINISTRATION_ACCESS }
|
||||
- { path: "^/api", role: ROLE_API_ACCESS }
|
||||
- { path: "^/api/.*", role: ROLE_API_ACCESS }
|
||||
- { path: "^/(?!admin|api)[^/]++/account", role: ROLE_USER }
|
||||
```
|
||||
### Database Migrations
|
||||
|
|
@ -565,4 +565,3 @@ fos_rest:
|
|||
### Behat
|
||||
|
||||
* `Sylius\Behat\Page\Admin\Crud\IndexPage`, `Sylius\Behat\Page\Admin\Crud\CreatePage`, `Sylius\Behat\Page\Admin\Crud\UpdatePage` now accepts route name instead of resource name.
|
||||
|
||||
|
|
|
|||
|
|
@ -56,5 +56,5 @@ fos_rest:
|
|||
empty_content: 204
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
|
||||
- { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
|
||||
- { path: '^/', stop: true }
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
parameters:
|
||||
sylius.security.admin_regex: "^/admin"
|
||||
sylius.security.api_regex: "^/api"
|
||||
sylius.security.shop_regex: "^/(?!admin|api)[^/]++"
|
||||
sylius.security.shop_regex: "^/(?!admin|api/.*|api$)[^/]++"
|
||||
|
||||
security:
|
||||
providers:
|
||||
|
|
@ -46,7 +46,7 @@ security:
|
|||
security: false
|
||||
|
||||
api:
|
||||
pattern: "%sylius.security.api_regex%"
|
||||
pattern: "%sylius.security.api_regex%/.*"
|
||||
fos_oauth: true
|
||||
stateless: true
|
||||
anonymous: true
|
||||
|
|
@ -98,5 +98,5 @@ security:
|
|||
- { path: "%sylius.security.shop_regex%/verify", role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
|
||||
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
|
||||
- { path: "%sylius.security.api_regex%", role: ROLE_API_ACCESS }
|
||||
- { path: "%sylius.security.api_regex%/.*", role: ROLE_API_ACCESS }
|
||||
- { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue