当前位置:网站首页>Implement anti-theft chain through referer request header
Implement anti-theft chain through referer request header
2022-07-25 12:13:00 【JackLi0812】
adopt Referer Request head realizes anti-theft chain
<a href="${pageContext.request.contextPath }/NewsServlet"> Big news </a>public class NewsServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(" This great Xia eats steamed stuffed buns ....");
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
public class NewsServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
String referer = request.getHeader("Referer");
if(referer == null || "".equals(referer) || !referer.contains("localhost/")) {
response.sendRedirect(request.getContextPath() + "/index.jsp");
return;
}
response.getWriter().write(" This great Xia eats steamed stuffed buns ....");
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}

边栏推荐
- [multimodal] hit: hierarchical transformer with momentum contract for video text retrieval iccv 2021
- Scott+scott law firm plans to file a class action against Yuga labs, or will confirm whether NFT is a securities product
- 【云驻共创】AI在数学界有哪些作用?未来对数学界会有哪些颠覆性影响?
- 【GCN-RS】Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for RS (SIGIR‘22)
- Video Caption(跨模态视频摘要/字幕生成)
- What is the difference between session and cookie?? Xiaobai came to tell you
- Feign使用
- Meta-learning(元学习与少样本学习)
- R语言ggplot2可视化:可视化散点图并为散点图中的部分数据点添加文本标签、使用ggrepel包的geom_text_repel函数避免数据点之间的标签互相重叠(为数据点标签添加线段、指定线段的角度
- Brpc source code analysis (I) -- the main process of RPC service addition and server startup
猜你喜欢

【黑马早报】运营23年,易趣网宣布关停;蔚来对大众CEO抛出橄榄枝;华为天才少年曾放弃360万年薪;尹烨回应饶毅炮轰其伪科学...

【GCN-RS】Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for RS (SIGIR‘22)

【图攻防】《Backdoor Attacks to Graph Neural Networks 》(SACMAT‘21)

【GCN-RS】Towards Representation Alignment and Uniformity in Collaborative Filtering (KDD‘22)

【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)

面试官:“同学,你做过真实落地项目吗?”

图神经网络用于推荐系统问题(IMP-GCN,LR-GCN)

【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)

Brpc source code analysis (V) -- detailed explanation of basic resource pool

dirReader.readEntries 兼容性问题 。异常错误DOMException
随机推荐
【黑马早报】运营23年,易趣网宣布关停;蔚来对大众CEO抛出橄榄枝;华为天才少年曾放弃360万年薪;尹烨回应饶毅炮轰其伪科学...
PHP curl post x-www-form-urlencoded
Median (二分答案 + 二分查找)
PHP curl post length required error setting header header
Brpc source code analysis (I) -- the main process of RPC service addition and server startup
【多模态】《TransRec: Learning Transferable Recommendation from Mixture-of-Modality Feedback》 Arxiv‘22
[multimodal] hit: hierarchical transformer with momentum contract for video text retrieval iccv 2021
[high concurrency] a lock faster than read-write lock in high concurrency scenarios. I'm completely convinced after reading it!! (recommended Collection)
Scott+Scott律所计划对Yuga Labs提起集体诉讼,或将确认NFT是否属于证券产品
【AI4Code】《CodeBERT: A Pre-Trained Model for Programming and Natural Languages》 EMNLP 2020
Zero shot image retrieval (zero sample cross modal retrieval)
Brpc source code analysis (II) -- the processing process of brpc receiving requests
Eureka使用记录
Heterogeneous graph neural network for recommendation system problems (ackrec, hfgn)
从云原生到智能化,深度解读行业首个「视频直播技术最佳实践图谱」
Hardware connection server TCP communication protocol gateway
R语言使用wilcox.test函数执行wilcox符号秩检验获取总体中位数(median)的置信区间(默认输出结果包括95%置信水平的置信区间)
R语言可视化散点图、使用ggrepel包的geom_text_repel函数避免数据点之间的标签互相重叠(设置min.segment.length参数为Inf不添加标签线段)
微信公众号开发 入手
小程序image 无法显示base64 图片 解决办法 有效