Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nginx static-files wasm plugin #1643

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

haifzhu
Copy link
Collaborator

@haifzhu haifzhu commented Jan 3, 2025

Ⅰ. Describe what this PR did

支持nginx static files的功能,支持指令:

  • root
  • alias
  • index
  • try-files

Ⅱ. Does this pull request fix one issue?

fix #840

Ⅲ. Why don't you add test cases (unit test/integration test)?

test cases be added in codes.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.52%. Comparing base (ef31e09) to head (ae6480c).
Report is 248 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1643      +/-   ##
==========================================
+ Coverage   35.91%   43.52%   +7.61%     
==========================================
  Files          69       76       +7     
  Lines       11576    12325     +749     
==========================================
+ Hits         4157     5364    +1207     
+ Misses       7104     6626     -478     
- Partials      315      335      +20     

see 69 files with indirect coverage changes

| 名称 | 数据类型 | 填写要求 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| `root` | string | 非必填 | - | root路径 |
| `alias_path` | string | 非必填 | - | alias待替换的路径 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alias path 用户不容易理解,还是用 location 来配置路径吧

- `try paths`: 请求基于不同的路径进行重试,直到请求到正确返回的请求。

# 配置字段

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我倾向于只配置一条路由转发给oss服务,然后这个路由上配置这个插件,通过 location 数组,指定好每个兼容nginx location的静态文件转发规则

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support of try_files usage
3 participants