我剛剛在我的子域上使用NGINX的SSL證書設置了自定義API。一切工作正常(獲取請求等),但是,每當我嘗試進行身份驗證,我收到401'無效的憑據'。Laravel HTTPS URL隨機字符?
當我死亡和傾倒$request->all();
我想通了,我突然有一個額外的GET參數稱爲'q'?對於https://api.domain.com/api/v1/[email protected]&password=test我的憑據突然變成:
q => [email protected]
password => test
我完全莫名其妙,沒有任何人有一個想法,怎麼回事?這發生在我激活我的SSL證書時。
我認爲q是查詢.. 另外,這裏是我的路線文件:
Route::get('/', function() {
return 'Welcome to API';
});
/* API Version 1 */
Route::group(['prefix' => 'v1', 'middleware' => 'cors'], function() {
Route::post('/login', '[email protected]');
Route::group(['middleware' => ['jwt.auth']], function() {
Route::resource('users', 'UsersController', ['only' => ['index', 'show', 'store']]);
Route::resource('rooms', 'RoomsController', ['only' => ['index', 'show']]);
Route::resource('reservations', 'ReservationsController');
Route::resource('customers', 'CustomersController');
Route::get('rooms/{id}/reservations', '[email protected]');
Route::get('users/{id}/reservations', '[email protected]');
Route::get('users/{id}/customers', '[email protected]');
Route::get('reservations/{id}/customer', '[email protected]');
Route::get('me', '[email protected]uthenticatedUser');
Route::get('me/reservations', '[email protected]');
Route::get('me/customers', '[email protected]');
});
});
TIA
嗯,謝謝,我要看看 –
你能否詳細說明可能?我還沒有弄清楚它...... –