简体   繁体   English

PATCH请求403禁止

[英]PATCH request 403 Forbidden

I've recently tried installing a OpenSource Package called EspoCRM It uses PATCH requests to edit records. 我最近尝试安装一个名为EspoCRM的OpenSource包它使用PATCH请求来编辑记录。 Yet I can't seem to get it working propperly. 然而,我似乎无法让它正常运作。

I've installed it on a Linux Apache server with PHP 5.4.31. 我已经在PHP 5.4.31的Linux Apache服务器上安装了它。 I tried to set all CHMOD to 777 as a test but that didn't help it. 我试图将所有CHMOD设置为777作为测试,但这没有帮助。

I've contacted the creator what I'm doing wrong. 我联系了创作者,我做错了什么。 He thinks my server might be blocking PATCH requests. 他认为我的服务器可能阻止了PATCH请求。 So I installed it on a XAMPP test on my Destkop and that worked fine. 所以我把它安装在我的Destkop上的XAMPP测试中,并且工作正常。 Yet I can't find any way to deny or allow PATCH requests. 然而,我找不到任何拒绝或允许PATCH请求的方法。

Does anyone know how to fix this? 有谁知道如何解决这一问题?

Edit: If I grab the request URL and just open the URL in a new tab it opens correctly. 编辑:如果我抓取请求URL并在新标签页中打开URL,则会正确打开。 It just doens't handle the request 它只是不处理请求

The vhost needs permission to handle methods like PATCH. vhost需要权限来处理PATCH等方法。

Add the LIMIT rules like below in your directory section in the vhost config: 在vhost配置的目录部分中添加如下所示的LIMIT规则:

  <Limit GET POST PUT DELETE HEAD OPTIONS PATCH>
      Order allow,deny
      Allow from all
  </Limit>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM