Skip to content

不能反向代理子目录访问RSSHub #8254

@leirock

Description

@leirock

预期是什么

RSSHub 访问路径使用域名的子目录,例如 https://example.com/rsshub/ 而不是 https://rsshub.example.com/

实际发生了什么

提示 wrong path (报错信息见额外信息

部署相关信息

Env Value
OS Debian GNU/Linux 10 x86_64(Py3.7.8)
Node version v14.17.6
if Docker, version 18.09.1, build 4c52b90
  • 额外信息(日志、报错等)

设置子目录的反向代理后,报错如下

Route requested: /rsshub/
Error message: wrong path
Helpful Information to provide when opening issue: 
Path: /rsshub/
Node version: v14.17.6

Nginx 反向代理设置如下:

location /rsshub/
{
    proxy_pass http://localhost:1200;
    proxy_set_header Host localhost;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    
    add_header X-Cache $upstream_cache_status;
    add_header Cache-Control no-cache;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions