仅接受来自自己服务器的 POST
我已经用 PHP 开发了一个项目,现在我需要处理那些从我自己的服务器发送的 POST 数据!
怎么办?
REFERRER 不是解决方案,因为它可以轻松被阻止/删除或更改!
.htaccess 中有代码可以阻止它吗?
i have developed a project in PHP now i need to process those POST DATA which have been sent from my own server !
how to do it ?
REFERRER is not a solution, as it can be blocked/removed or changed easily !
is there code to stop it in .htaccess ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试使用 加密随机数 :基于随机数的身份验证过程中的典型客户端-服务器通信包括服务器随机数和客户端随机数(可以使用从服务器接收的随机数构建此客户端随机数)。
现在,这并不会让您变得超级安全(因为有些人可以很容易地绕过这个),对于大多数人来说,在您的网站上发帖会变得更加困难。
(此图像向您展示了如何在身份验证过程中使用随机数,但是您也可以将其用于非身份验证目的)
You could try to use cryptographic nonce : Typical client-server communication during a nonce-based authentication process including both a server nonce and a client nonce ( this client nonce could be built using the nonce recived from the server ) .
Now this doesn't make you super secure ( as there will be people who would be able to bypass this rather easy ) it will be harder for most floks to make a post to you're website .
( this image shows you how to use nonces in an authetification process , however you could use it for non authentification purposes )