Why shouldn't data be modified on an HTTP GET request?

后端 未结 7 763
暗喜
暗喜 2020-11-27 05:36

I know that using non-GET methods (POST, PUT, DELETE) to modify server data is The Right Way to do things. I can find multiple resources claiming that GET requests should no

相关标签:
7条回答
  • 2020-11-27 06:02

    Security: CSRF is so much easier in GET requests.

    Using POST won't protect you anyway but GET can lead easier exploitation and mass exploitation by using forums and places which accepts image tags.

    Depending on what you do in server-side using GET can help attacker to launch DoS (Denial of Service). An attacker can spam thousands of websites with your expensive GET request in an image tag and every single visitor of those websites will carry out this expensive GET request against your web server. Which will cause lots of CPU cycle to you.

    I'm aware that some pages are heavy anyway and this is always a risk, but it's bigger risk if you add 10 big records in every single GET request.

    0 讨论(0)
提交回复
热议问题