<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>重定向 on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek001/tags/%E9%87%8D%E5%AE%9A%E5%90%91/</link>
    <description>Recent content in 重定向 on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Sun, 28 Apr 2024 07:07:08 +0000</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek001/tags/%E9%87%8D%E5%AE%9A%E5%90%91/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>前端解决Ajax请求被重定向问题</title>
      <link>https://index.zshipu.com/geek001/post/20240428/%E5%89%8D%E7%AB%AF%E8%A7%A3%E5%86%B3Ajax%E8%AF%B7%E6%B1%82%E8%A2%AB%E9%87%8D%E5%AE%9A%E5%90%91%E9%97%AE%E9%A2%98--%E7%9F%A5%E8%AF%86%E9%93%BA/</link>
      <pubDate>Sun, 28 Apr 2024 07:07:08 +0000</pubDate>
      <guid>https://index.zshipu.com/geek001/post/20240428/%E5%89%8D%E7%AB%AF%E8%A7%A3%E5%86%B3Ajax%E8%AF%B7%E6%B1%82%E8%A2%AB%E9%87%8D%E5%AE%9A%E5%90%91%E9%97%AE%E9%A2%98--%E7%9F%A5%E8%AF%86%E9%93%BA/</guid>
      <description>置顶 我女儿有仙女棒 于 2019-07-16 10:21:19 发布 解决方法： 1 前端在ajax请求 header 里面添加 X-Requested-With = XMLHttpRequest 1 原因是 IndirectClient 类里面的 getRedirectAction 方法里面已经做了判断的，只要让后台识别成ajax请求就行 看源码会抛出 HttpAction.unauthorized(context) 异常， 统一捕捉就行了</description>
    </item>
  </channel>
</rss>
