Skip to content

Commit d8e1048

Browse files
authored
Merge pull request #24 from SpearDevs/disabling-localised-urls
Disabling localised urls
2 parents 241a9be + 56d3e45 commit d8e1048

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

config/routing/shop_routing.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
speardevs_push_notifications_section:
2-
path: /{_locale}/account/push-notifications
2+
path: /account/push-notifications
33
defaults:
44
_controller: 'SpearDevs\SyliusPushNotificationsPlugin\Controller\Shop\PushNotificationAction'
55
template: '@SpearDevsSyliusPushNotificationsPlugin/Shop/Account/push_notification.html.twig'
66

77
speardevs_push_notifications_history_index:
8-
path: /{_locale}/account/push-notifications-history
8+
path: /account/push-notifications-history
99
methods: [ GET ]
1010
defaults:
1111
_controller: speardevs_sylius_push_notifications_plugin.controller.push_notification_history::indexAction
@@ -23,7 +23,7 @@ speardevs_push_notifications_history_index:
2323
- "expr:service('sylius.context.customer').getCustomer()"
2424

2525
speardevs_push_notifications_history_mark_as_received:
26-
path: /{_locale}/account/push-notifications-history/{id}/mark-as-received
26+
path: /account/push-notifications-history/{id}/mark-as-received
2727
methods: [ PUT ]
2828
defaults:
2929
_controller: speardevs_sylius_push_notifications_plugin.controller.push_notification_history::applyStateMachineTransitionAction
@@ -36,4 +36,4 @@ speardevs_push_notifications_history_mark_as_received:
3636

3737
bentools_webpush:
3838
resource: '@WebPushBundle/Resources/config/routing.xml'
39-
prefix: /{_locale}/webpush
39+
prefix: /webpush

templates/Shop/PushNotifications/_push_notifications_controls.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{ stimulus_controller('shop/push-notifications', {
33
publicKey: app.request.server.get('WEBPUSH_PUBLIC_KEY'),
44
serviceWorkerPath: '/serviceWorker.js',
5-
subscribeUrl: '/' ~ app.request.locale ~ '/webpush/'
5+
subscribeUrl: '/webpush/'
66
}) }}
77
>
88
<button

tests/Application/config/packages/_sylius.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ parameters:
1515
sylius_shop:
1616
product_grid:
1717
include_all_descendants: true
18+
locale_switcher: storage
1819

1920
sylius_api:
2021
enabled: true

tests/Application/config/packages/security.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
sylius.security.shop_regex: "^(?:/(?!%sylius_admin.path_name%|api/.*|api$|media/.*)[^/]++)?"
3+
14
security:
25
enable_authenticator_manager: true
36
providers:
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
sylius_shop:
22
resource: "@SyliusShopBundle/Resources/config/routing.yml"
3-
prefix: /{_locale}
4-
requirements:
5-
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
63

74
sylius_shop_payum:
85
resource: "@SyliusShopBundle/Resources/config/routing/payum.yml"
9-
10-
sylius_shop_default_locale:
11-
path: /
12-
methods: [GET]
13-
defaults:
14-
_controller: sylius.controller.shop.locale_switch::switchAction

0 commit comments

Comments
 (0)