portal.mkgtu.ru/frontend/config/_urlManager.php

34 lines
987 B
PHP
Raw Permalink Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\secureUrlManager\SecureUrlManager;
return [
'class' => SecureUrlManager::class,
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
['class' => 'yii\rest\UrlRule', 'controller' => 'api/v1/article', 'only' => ['index', 'view', 'options']],
[
'class' => 'yii\rest\UrlRule',
'controller' => 'api/v1/user',
'only' => ['index', 'view', 'options', 'current'],
'extraPatterns' => [
'current/<accessToken>' => 'current',
],
],
'<alias:authorize>' => 'site/<alias>',
'<alias:download>' => 'site/<alias>',
'<alias:download-pdf-file>' => 'site/<alias>',
'<alias:deletefile>' => 'site/<alias>',
'<alias:settings>' => 'settings/sandbox',
'POST oauth2/<action:\w+>' => 'oauth2/rest/<action>',
'admission/<action:\w+>' => 'admission/admission/<action>',
]
];