:middleware doesn't effect static files.
还没有人认领这个 Issue。
评估
调研方向
首先追踪 :duct.core/handler 如何应用 :middleware 向量,以及 :duct.router/cascading 如何处理资源路由。使用静态文件和 ring-gzip 重现该问题,并将其与普通路由进行比较。当已声明的 middleware 能够影响静态文件,而无需显式的 :duct.server.http handler wrapper 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Middleware added to the :duct.core/handler :middleware vector doesn't seem to have any effect on static files. This is unfortunate, as gzip (added via the ring-gzip middleware) is hugely important for compiled cljs.
Middleware correctly effects routes using :duct.router/cascading. However, "resource" compojure routes added using :duct.router/cascading don't seem to do anything, so that's little help.
The best solution I've been able to find is to explicitely declare a :duct.server.http with a handler that wraps the :duct.core/handler in whatever middleware I desire. This, I feel, is kludgy and inelegant compared to declaring a :handler :middleware.
- 主要语言
- Clojure
- 星标
- 22
- 派生
- 22
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
duct-framework/module.web 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 45/100
duct-framework/module.web#23 · 4 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 25/100
duct-framework/module.web#21 ·
-
难度 4/5 3-5 天 新手友好度 42/100
duct-framework/module.web#8 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
duct-framework/module.web#4 · 1 条评论 ·
查看 duct-framework/module.web 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
editor-code-assistant/eca#655 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
calcit-lang/calcit#2151 · 1 条评论 ·
维护者通常 1 天内回复
-
worker/start rejects middleware supplied as a Var可能已有人在做 @rajp152k 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100