mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2535] 希望支持static_file指定404错误页面功能 #2016
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2016
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ohto-ai on GitHub (Aug 18, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2535
是否可以为静态文件访问服务添加一个404错误界面自定义功能呢?
不过另一种更好的方法是使用nginx等服务器运行web服务再由frps反代,如果frpc中的static_file也支持指定404位置的话就更好了
@fatedier commented on GitHub (Aug 19, 2021):
https://github.com/fatedier/frp/issues/1624
@ohto-ai commented on GitHub (Aug 20, 2021):
custom_404_page无法指定static_file的404界面。例如我的网站thatboy.info是frp的static_file服务。
虽然可以用nginx运行web并指定404,但static_file的404页面也可以自定义就不需要nginx了。
当然,只是一个建议
@fatedier commented on GitHub (Aug 20, 2021):
static_file 只是一个用于快速将内部文件暴露出去用于访问的简单插件,并不是完整的 web server,目的不是替代 nginx,所以也不会继续提供 web server 相关的能力。目前这种方式,不管是性能还是安全性都没有任何保障,建议不要用于生产环境。
你需要的能力,以后如果有可能,会通过另外一种额外下载插件的方式来提供(插件编译为二进制文件或者类似 webassembly 的技术),按需下载,不会放到 frp 的核心逻辑里。这样,一个类似 nginx 的插件可以提供更丰富的能力,满足更多的需求,且可以单独发展,不会让 frp 的核心逻辑变得复杂。
@ohto-ai commented on GitHub (Aug 22, 2021):
好的,感谢!
如果能以二进制文件形式作为插件来支持就更棒了
@fatedier commented on GitHub (Aug 23, 2021):
@Ohto-Ai 在计划这件事,是一个比较大的功能,会持续比较长的一段时间。