How to make sure that my AJAX requests are originating from the same server in Python

后端 未结 8 1765
故里飘歌
故里飘歌 2021-01-31 18:30

I have already asked a question about IP Authentication here: TastyPie Authentication from the same server

However, I need something more! An IP address could be very e

8条回答
  •  时光取名叫无心
    2021-01-31 18:57

    If it's purely the same server, you can verify requests against 127.0.0.1 or localhost.

    Otherwise the solution is probably at the network level, to have a separate private subnet that you can check against. It should be difficult for an attacker to spoof your subnet without being on your subnet.

提交回复
热议问题