Skip to content

[Bug] 在访问指定目录存在301重定向到源站端口的问题 #321

Description

@chettestwef

问题描述

在访问指定目录:/myExp,/AddExp时,出现301错误,并且在更新了waf后无法恢复,以下是waf设置,相关证据,访问路径
image
image
image
image

复现方法

由于此问题的独立性,此问题貌似仅能在我的服务器上复现

期望的结果

修复此问题

Activity

  1. chettestwef commented on Sep 16, 2023

    @chettestwef
    Author

    我是不理解,我以为是我的php写的有问题,他怎么能301跳转呢,我排查了半个小时发现此问题出在waf上

  2. chettestwef commented on Sep 16, 2023

    @chettestwef
    Author

    我好想知道问题所在了,我的源url是:
    http://slaspi.xxxxxx.cn:3656/Event/addEscape/FacilityGuard-Escape?userid=xxxxxxxxx@steamscape=1
    请看?号前面并没有 / 所以,nginx会尝试通过301修正此url为:
    http://slaspi.xxxxxx.cn:3658/Event/addEscape/FacilityGuard-Escape/?userid=xxxxxxxxx@steamscape=1
    但上述修正恰恰返回到了源站

  3. Lorna0 commented on Sep 18, 2023

    @Lorna0
    Collaborator

    非预期的 301 重定向基本都是后端服务的逻辑,和 waf 无关。最常见的是 nginx 自动添加 / ,还有一种是填错协议结果后台 http 301 到 https。

    问题似乎解决了,issue 关闭。

  4. locked and limited conversation to collaborators on Oct 31, 2023
  5. converted this issue into a discussion #419 on Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions