nginx 的更改:
? ? ? ? set $method $request_method;
? ? ? ? if ($http_X_HTTP_Method_Override ~* 'PUT|DELETE') {
? ? ? ? ? ? set $method $http_X_HTTP_Method_Override;
? ? ? ? }
? ? ? ? proxy_method $method;
?
axios 的更改:
? ? ? const method = config.method?.toUpperCase();
? ? ? if (method === 'PUT' || method === 'DELETE') {
? ? ? ? config.method = 'post';
? ? ? ? config.headers['X-HTTP-Method-Override'] = method;
? ? ? }