You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/27 15:07:48 UTC

[GitHub] [apisix-dashboard] starsz opened a new pull request #1831: fix: use remote address instead of client ip

starsz opened a new pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831


   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   Now, we use the gin's context.ClientIP.This function will parse the IP from the header `X-Forwarded-For` and `X-Real-Ip`
   which will bypass the ipfilter middleware.
   
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   Use remote address instead of client ip.
   
   
   **Checklist:**
   
   - [x] Did you explain what problem does this PR solve? Or what new features have been added?
   - [x] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5e04afc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/f146898df8ac081900c858b88653a9acb9b3f6fc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f146898) will **decrease** coverage by `25.54%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 5e04afc differs from pull request most recent head 5c52a25. Consider uploading reports for the commit 5c52a25 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1831       +/-   ##
   ===========================================
   - Coverage   71.62%   46.08%   -25.55%     
   ===========================================
     Files         172       47      -125     
     Lines        6119     3177     -2942     
     Branches      711        0      -711     
   ===========================================
   - Hits         4383     1464     -2919     
   + Misses       1487     1445       -42     
   - Partials      249      268       +19     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.08% <100.00%> (-0.03%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `56.09% <100.00%> (-15.70%)` | :arrow_down: |
   | [api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3BsdWdpbi5nbw==) | `15.00% <0.00%> (-85.00%)` | :arrow_down: |
   | [api/internal/handler/tool/tool.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdG9vbC90b29sLmdv) | `13.88% <0.00%> (-80.56%)` | :arrow_down: |
   | [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `4.61% <0.00%> (-78.47%)` | :arrow_down: |
   | [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==) | `23.80% <0.00%> (-76.20%)` | :arrow_down: |
   | [api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==) | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `12.04% <0.00%> (-61.26%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `31.42% <0.00%> (-59.29%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `33.33% <0.00%> (-57.15%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `41.73% <0.00%> (-50.44%)` | :arrow_down: |
   | ... and [148 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f146898...5c52a25](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz merged pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
starsz merged pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] netlify[bot] commented on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
netlify[bot] commented on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827682091


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 99fca5e337f0d520884f523982c032f58e8b9c04
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/608828b6ac3fa000075979cc


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5e04afc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/f146898df8ac081900c858b88653a9acb9b3f6fc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f146898) will **decrease** coverage by `9.81%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 5e04afc differs from pull request most recent head 5c52a25. Consider uploading reports for the commit 5c52a25 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1831      +/-   ##
   ==========================================
   - Coverage   71.62%   61.81%   -9.82%     
   ==========================================
     Files         172       47     -125     
     Lines        6119     3177    -2942     
     Branches      711        0     -711     
   ==========================================
   - Hits         4383     1964    -2419     
   + Misses       1487      899     -588     
   - Partials      249      314      +65     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.08% <100.00%> (-0.03%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `49.03% <100.00%> (-0.04%)` | :arrow_down: |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `56.09% <100.00%> (-15.70%)` | :arrow_down: |
   | [api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==) | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | [api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | `47.22% <0.00%> (-30.56%)` | :arrow_down: |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `59.88% <0.00%> (-28.15%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `66.08% <0.00%> (-26.09%)` | :arrow_down: |
   | [api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=) | `64.51% <0.00%> (-19.36%)` | :arrow_down: |
   | [...pi/internal/handler/plugin\_config/plugin\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcGx1Z2luX2NvbmZpZy9wbHVnaW5fY29uZmlnLmdv) | `59.57% <0.00%> (-18.09%)` | :arrow_down: |
   | [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=) | `75.00% <0.00%> (-16.08%)` | :arrow_down: |
   | [api/internal/utils/json\_patch.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2pzb25fcGF0Y2guZ28=) | `44.82% <0.00%> (-13.80%)` | :arrow_down: |
   | ... and [140 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f146898...5c52a25](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a757f3) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2f3717fbcc22e88c0212feb082e8893ef903b011?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2f3717f) will **decrease** coverage by `4.13%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 7a757f3 differs from pull request most recent head 99fca5e. Consider uploading reports for the commit 99fca5e to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1831      +/-   ##
   ==========================================
   - Coverage   72.07%   67.94%   -4.14%     
   ==========================================
     Files         125       47      -78     
     Lines        2944     3154     +210     
     Branches      711        0     -711     
   ==========================================
   + Hits         2122     2143      +21     
   + Misses        822      748      -74     
   - Partials        0      263     +263     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.48% <100.00%> (?)` | |
   | backend-unit-test | `52.47% <100.00%> (?)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (ø)` | |
   | [...src/pages/SSL/components/CertificateForm/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TU0wvY29tcG9uZW50cy9DZXJ0aWZpY2F0ZUZvcm0vaW5kZXgudHN4) | | |
   | [...s/Upstream/components/active-check/Concurrency.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL0NvbmN1cnJlbmN5LnRzeA==) | | |
   | [web/src/components/RightContent/AvatarDropdown.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1JpZ2h0Q29udGVudC9BdmF0YXJEcm9wZG93bi50c3g=) | | |
   | [web/src/components/Plugin/data.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9kYXRhLnRzeA==) | | |
   | [.../src/pages/Route/components/Step1/ProxyRewrite.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL1Byb3h5UmV3cml0ZS50c3g=) | | |
   | [web/src/components/LabelsfDrawer/LabelsDrawer.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL0xhYmVsc2ZEcmF3ZXIvTGFiZWxzRHJhd2VyLnRzeA==) | | |
   | [.../components/passive-check/Healthy/HttpStatuses.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvcGFzc2l2ZS1jaGVjay9IZWFsdGh5L0h0dHBTdGF0dXNlcy50c3g=) | | |
   | [web/src/libs/iconfont.js](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9saWJzL2ljb25mb250Lmpz) | | |
   | [web/src/pages/Dashboard/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9EYXNoYm9hcmQvc2VydmljZS50cw==) | | |
   | ... and [163 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2f3717f...99fca5e](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2e72edb) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2f3717fbcc22e88c0212feb082e8893ef903b011?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2f3717f) will **decrease** coverage by `0.18%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1831      +/-   ##
   ==========================================
   - Coverage   72.07%   71.89%   -0.19%     
   ==========================================
     Files         125      172      +47     
     Lines        2944     6098    +3154     
     Branches      711      711              
   ==========================================
   + Hits         2122     4384    +2262     
   - Misses        822     1471     +649     
   - Partials        0      243     +243     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.35% <100.00%> (?)` | |
   | backend-e2e-test-ginkgo | `49.33% <100.00%> (?)` | |
   | backend-unit-test | `52.44% <100.00%> (?)` | |
   | frontend-e2e-test | `72.14% <ø> (+0.06%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (ø)` | |
   | [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `71.02% <0.00%> (ø)` | |
   | [api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3BsdWdpbi5nbw==) | `100.00% <0.00%> (ø)` | |
   | [api/internal/filter/logging.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9sb2dnaW5nLmdv) | `95.65% <0.00%> (ø)` | |
   | [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `85.29% <0.00%> (ø)` | |
   | [api/internal/utils/json\_patch.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2pzb25fcGF0Y2guZ28=) | `58.62% <0.00%> (ø)` | |
   | [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `83.07% <0.00%> (ø)` | |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `64.91% <0.00%> (ø)` | |
   | [api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==) | `100.00% <0.00%> (ø)` | |
   | ... and [39 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2f3717f...2e72edb](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on a change in pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#discussion_r622016559



##########
File path: api/internal/filter/ip_filter.go
##########
@@ -81,7 +82,10 @@ func checkIP(ipStr string, ips map[string]bool, subnets []*subnet) bool {
 func IPFilter() gin.HandlerFunc {
 	ips, subnets := generateIPSet(conf.AllowList)
 	return func(c *gin.Context) {
-		ipStr := c.ClientIP()
+		var ipStr string
+		if ip, _, err := net.SplitHostPort(strings.TrimSpace(c.Request.RemoteAddr)); err == nil {

Review comment:
       Referer from gin:
   
   https://github.com/gin-gonic/gin/blob/ee4de846a894e9049321e809d69f4343f62d2862/context.go#L760-L763




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827682091


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 2e72edbd6409d5e5f26fe82ecfca2917e9c649ef
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/608a0beebb29310008507254


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a757f3) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2f3717fbcc22e88c0212feb082e8893ef903b011?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2f3717f) will **decrease** coverage by `0.32%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 7a757f3 differs from pull request most recent head 99fca5e. Consider uploading reports for the commit 99fca5e to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1831      +/-   ##
   ==========================================
   - Coverage   72.07%   71.75%   -0.33%     
   ==========================================
     Files         125       47      -78     
     Lines        2944     3154     +210     
     Branches      711        0     -711     
   ==========================================
   + Hits         2122     2263     +141     
   + Misses        822      648     -174     
   - Partials        0      243     +243     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.48% <100.00%> (?)` | |
   | backend-e2e-test-ginkgo | `49.52% <100.00%> (?)` | |
   | backend-unit-test | `52.47% <100.00%> (?)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (ø)` | |
   | [web/src/pages/Service/components/Preview.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL2NvbXBvbmVudHMvUHJldmlldy50c3g=) | | |
   | [...components/active-check/Unhealthy/HttpFailures.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1VuaGVhbHRoeS9IdHRwRmFpbHVyZXMudHN4) | | |
   | [...eb/src/pages/PluginTemplate/components/Preview.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9jb21wb25lbnRzL1ByZXZpZXcudHN4) | | |
   | [...mponents/Upstream/components/active-check/Type.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1R5cGUudHN4) | | |
   | [web/src/components/Upstream/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL3NlcnZpY2UudHM=) | | |
   | [web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | | |
   | [web/src/services/tool.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9zZXJ2aWNlcy90b29sLnRz) | | |
   | [web/src/pages/SSL/components/Step2/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TU0wvY29tcG9uZW50cy9TdGVwMi9pbmRleC50c3g=) | | |
   | [...mponents/Upstream/components/active-check/Port.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1BvcnQudHN4) | | |
   | ... and [163 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2f3717f...99fca5e](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2e72edb) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2f3717fbcc22e88c0212feb082e8893ef903b011?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2f3717f) will **decrease** coverage by `0.42%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1831      +/-   ##
   ==========================================
   - Coverage   72.07%   71.65%   -0.43%     
   ==========================================
     Files         125       47      -78     
     Lines        2944     3154     +210     
     Branches      711        0     -711     
   ==========================================
   + Hits         2122     2260     +138     
   + Misses        822      651     -171     
   - Partials        0      243     +243     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.35% <100.00%> (?)` | |
   | backend-e2e-test-ginkgo | `49.33% <100.00%> (?)` | |
   | backend-unit-test | `52.44% <100.00%> (?)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (ø)` | |
   | [...ages/Route/components/Step2/RequestRewriteView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAyL1JlcXVlc3RSZXdyaXRlVmlldy50c3g=) | | |
   | [web/src/components/Upstream/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL3NlcnZpY2UudHM=) | | |
   | [web/src/components/Plugin/UI/limit-conn.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9saW1pdC1jb25uLnRzeA==) | | |
   | [...eb/src/components/Upstream/components/PassHost.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvUGFzc0hvc3QudHN4) | | |
   | [web/src/pages/Dashboard/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9EYXNoYm9hcmQvc2VydmljZS50cw==) | | |
   | [web/src/components/Upstream/constant.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbnN0YW50LnRz) | | |
   | [...es/Route/components/DebugViews/DebugParamsView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RlYnVnVmlld3MvRGVidWdQYXJhbXNWaWV3LnRzeA==) | | |
   | [web/src/components/IconFont/IconFont.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL0ljb25Gb250L0ljb25Gb250LnRzeA==) | | |
   | [web/src/components/Plugin/UI/limit-count.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9saW1pdC1jb3VudC50c3g=) | | |
   | ... and [163 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2f3717f...2e72edb](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5c52a25) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/f146898df8ac081900c858b88653a9acb9b3f6fc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f146898) will **decrease** coverage by `19.14%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1831       +/-   ##
   ===========================================
   - Coverage   71.62%   52.47%   -19.15%     
   ===========================================
     Files         172       39      -133     
     Lines        6119     2742     -3377     
     Branches      711        0      -711     
   ===========================================
   - Hits         4383     1439     -2944     
   + Misses       1487     1109      -378     
   + Partials      249      194       -55     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `52.47% <100.00%> (+0.03%)` | :arrow_up: |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (+1.37%)` | :arrow_up: |
   | [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | ... and [158 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f146898...5c52a25](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827682091


   Deploy preview for *apisix-dashboard* processing.
   
   Building with commit 5c52a257041e41f3709ca3953545c3592cbbb177
   
   https://app.netlify.com/sites/apisix-dashboard/deploys/608ba0acdb504a00070bd372


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2e72edb) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2f3717fbcc22e88c0212feb082e8893ef903b011?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2f3717f) will **decrease** coverage by `19.63%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1831       +/-   ##
   ===========================================
   - Coverage   72.07%   52.44%   -19.64%     
   ===========================================
     Files         125       39       -86     
     Lines        2944     2742      -202     
     Branches      711        0      -711     
   ===========================================
   - Hits         2122     1438      -684     
   - Misses        822     1110      +288     
   - Partials        0      194      +194     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-unit-test | `52.44% <100.00%> (?)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (ø)` | |
   | [web/src/components/LabelsfDrawer/LabelsDrawer.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL0xhYmVsc2ZEcmF3ZXIvTGFiZWxzRHJhd2VyLnRzeA==) | | |
   | [web/src/pages/Upstream/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9DcmVhdGUudHN4) | | |
   | [web/src/pages/Upstream/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9zZXJ2aWNlLnRz) | | |
   | [...components/passive-check/Unhealthy/TcpFailures.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvcGFzc2l2ZS1jaGVjay9VbmhlYWx0aHkvVGNwRmFpbHVyZXMudHN4) | | |
   | [web/src/components/Plugin/UI/limit-req.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9saW1pdC1yZXEudHN4) | | |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | | |
   | [...mponents/Upstream/components/active-check/Port.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1BvcnQudHN4) | | |
   | [web/src/components/Upstream/components/Type.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvVHlwZS50c3g=) | | |
   | [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9hcHAudHN4) | | |
   | ... and [155 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2f3717f...2e72edb](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827682091


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit 2e72edbd6409d5e5f26fe82ecfca2917e9c649ef
   
   https://deploy-preview-1831--apisix-dashboard.netlify.app


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827688769


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1831](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2e72edb) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2f3717fbcc22e88c0212feb082e8893ef903b011?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2f3717f) will **decrease** coverage by `0.42%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1831      +/-   ##
   ==========================================
   - Coverage   72.07%   71.65%   -0.43%     
   ==========================================
     Files         125       47      -78     
     Lines        2944     3154     +210     
     Branches      711        0     -711     
   ==========================================
   + Hits         2122     2260     +138     
   + Misses        822      651     -171     
   - Partials        0      243     +243     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `46.35% <100.00%> (?)` | |
   | backend-e2e-test-ginkgo | `49.33% <100.00%> (?)` | |
   | backend-unit-test | `52.44% <100.00%> (?)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=) | `73.17% <100.00%> (ø)` | |
   | [web/src/pages/SSL/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TU0wvQ3JlYXRlLnRzeA==) | | |
   | [...eb/src/components/Upstream/components/TimeUnit.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvVGltZVVuaXQudHN4) | | |
   | [...mponents/Upstream/components/active-check/Port.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1BvcnQudHN4) | | |
   | [...eb/src/pages/PluginTemplate/components/Preview.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9jb21wb25lbnRzL1ByZXZpZXcudHN4) | | |
   | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | | |
   | [web/src/pages/Upstream/components/Step1.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9jb21wb25lbnRzL1N0ZXAxLnRzeA==) | | |
   | [.../components/active-check/Unhealthy/TCPFailures.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL1VuaGVhbHRoeS9UQ1BGYWlsdXJlcy50c3g=) | | |
   | [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9hcHAudHN4) | | |
   | [web/src/components/Plugin/UI/basic-auth.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9iYXNpYy1hdXRoLnRzeA==) | | |
   | ... and [163 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1831/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2f3717f...2e72edb](https://codecov.io/gh/apache/apisix-dashboard/pull/1831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] tokers commented on a change in pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#discussion_r622013366



##########
File path: api/internal/filter/ip_filter.go
##########
@@ -81,7 +82,10 @@ func checkIP(ipStr string, ips map[string]bool, subnets []*subnet) bool {
 func IPFilter() gin.HandlerFunc {
 	ips, subnets := generateIPSet(conf.AllowList)
 	return func(c *gin.Context) {
-		ipStr := c.ClientIP()
+		var ipStr string
+		if ip, _, err := net.SplitHostPort(strings.TrimSpace(c.Request.RemoteAddr)); err == nil {

Review comment:
       Why need `strings.TrimSpace`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827682091


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit 99fca5e337f0d520884f523982c032f58e8b9c04
   
   https://deploy-preview-1831--apisix-dashboard.netlify.app


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] tokers commented on a change in pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#discussion_r622021340



##########
File path: api/internal/filter/ip_filter.go
##########
@@ -81,7 +82,10 @@ func checkIP(ipStr string, ips map[string]bool, subnets []*subnet) bool {
 func IPFilter() gin.HandlerFunc {
 	ips, subnets := generateIPSet(conf.AllowList)
 	return func(c *gin.Context) {
-		ipStr := c.ClientIP()
+		var ipStr string
+		if ip, _, err := net.SplitHostPort(strings.TrimSpace(c.Request.RemoteAddr)); err == nil {

Review comment:
       All right.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on a change in pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#discussion_r622675976



##########
File path: api/internal/filter/ip_filter_test.go
##########
@@ -55,4 +56,22 @@ func TestIPFilter_Handle(t *testing.T) {
 	})
 	w = performRequest(r, "GET", "/test")
 	assert.Equal(t, 200, w.Code)
+
+	// should forbidden
+	conf.AllowList = []string{"8.8.8.8"}

Review comment:
       Ok. Updated.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] moonming commented on a change in pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#discussion_r622671526



##########
File path: api/internal/filter/ip_filter_test.go
##########
@@ -55,4 +56,22 @@ func TestIPFilter_Handle(t *testing.T) {
 	})
 	w = performRequest(r, "GET", "/test")
 	assert.Equal(t, 200, w.Code)
+
+	// should forbidden
+	conf.AllowList = []string{"8.8.8.8"}

Review comment:
       please use 127.0.0.1 for test




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #1831: fix: use remote address instead of client ip

Posted by GitBox <gi...@apache.org>.
netlify[bot] edited a comment on pull request #1831:
URL: https://github.com/apache/apisix-dashboard/pull/1831#issuecomment-827682091


   Deploy preview for *apisix-dashboard* ready!
   
   Built with commit 5c52a257041e41f3709ca3953545c3592cbbb177
   
   https://deploy-preview-1831--apisix-dashboard.netlify.app


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org