简体   繁体   中英

Is there any way in django to distinguish if it is a normal browser request or ajax request

I am using django and making some ajax request to server. As the url is visible in javascript someone could easily copy that and start making request via url bar. Is there any way in django that we can distinguish that the coming request is sent by ajax not a regular browser reqeust.

您可以在ajax中使用标记,也可以在代码检查请求中使用

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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