allow api prefix

This commit is contained in:
gilesb 2024-03-09 13:39:01 +00:00
parent 30587fb3df
commit b3f59a7513
1 changed files with 169 additions and 167 deletions

View File

@ -34,7 +34,7 @@ use Illuminate\Support\Facades\Storage;
| is assigned the "api" middleware group. Enjoy building your API! | is assigned the "api" middleware group. Enjoy building your API!
| |
*/ */
Route::group(['prefix' => $_ENV['API_PREFIX'] ?? ''], function () {
Route::group(['middleware' => 'auth:api'], function () { Route::group(['middleware' => 'auth:api'], function () {
Route::post('logout', [LoginController::class, 'logout']); Route::post('logout', [LoginController::class, 'logout']);
@ -235,3 +235,5 @@ Route::get('local/temp/{path}', function (Request $request, string $path) {
Route::get('caddy/ask-certificate/{secret?}', [\App\Http\Controllers\CaddyController::class, 'ask']) Route::get('caddy/ask-certificate/{secret?}', [\App\Http\Controllers\CaddyController::class, 'ask'])
->name('caddy.ask')->middleware(\App\Http\Middleware\CaddyRequestMiddleware::class); ->name('caddy.ask')->middleware(\App\Http\Middleware\CaddyRequestMiddleware::class);
}
)