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/08/07 06:20:23 UTC

[GitHub] [apisix-dashboard] foolwc opened a new pull request #2044: fix: redirect uri when session expired

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


   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   
   - [ ] Bugfix
   - [ ] New feature provided
   - [x] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   Redirect to the right page when session expired and login success.
   **Related issues**
   resolve #2029
   
   
   **Checklist:**
   
   - [x] Did you explain what problem does this PR solve? Or what new features have been added?
   - [ ] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [x] 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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] commented on pull request #2044: fix: redirect uri when session expired

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


   πŸ‘· Deploy Preview for *apisix-dashboard* processing.
   
   
   πŸ”¨ Explore the source changes: b39aa8d78c2714f2deffe363629835c6e5f92188
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/610e2620f7e41400080eb372](https://app.netlify.com/sites/apisix-dashboard/deploys/610e2620f7e41400080eb372?utm_source=github&utm_campaign=bot_dl)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] foolwc commented on a change in pull request #2044: fix: redirect uri when session expired

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



##########
File path: web/src/app.tsx
##########
@@ -33,7 +33,8 @@ export async function getInitialState(): Promise<{
 }> {
   const token = localStorage.getItem('token');
   if (!token) {
-    history.replace(`/user/login?redirect=${encodeURIComponent(window.location.pathname)}`);
+    const redirect = getUrlQuery('redirect');

Review comment:
       Got it. Thanks a lot 




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2044: fix: redirect uri when session expired

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2044?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 [#2044](https://codecov.io/gh/apache/apisix-dashboard/pull/2044?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8caca16) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0926b595a62cb07560baef1a2a4feac2387c0013?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0926b59) will **decrease** coverage by `1.94%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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/2044?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    #2044      +/-   ##
   ==========================================
   - Coverage   67.68%   65.74%   -1.95%     
   ==========================================
     Files         181      121      -60     
     Lines        6973     3205    -3768     
     Branches      773      779       +6     
   ==========================================
   - Hits         4720     2107    -2613     
   + Misses       1970     1098     -872     
   + Partials      283        0     -283     
   ```
   
   | Flag | Coverage Ξ” | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `65.74% <100.00%> (+1.83%)` | :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/2044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | |
   |---|---|---|
   | [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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) | `100.00% <100.00%> (ΓΈ)` | |
   | [web/src/components/Upstream/components/Type.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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=) | `100.00% <0.00%> (ΓΈ)` | |
   | [api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL21haW4uZ28=) | | |
   | [api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=) | | |
   | [api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=) | | |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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=) | | |
   | [api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv) | | |
   | [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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) | | |
   | [api/cmd/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2NtZC9zZXJ2aWNlLmdv) | | |
   | ... and [70 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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/2044?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/2044?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 [0926b59...8caca16](https://codecov.io/gh/apache/apisix-dashboard/pull/2044?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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2044: fix: redirect uri when session expired

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2044?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 [#2044](https://codecov.io/gh/apache/apisix-dashboard/pull/2044?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4ab20e1) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0926b595a62cb07560baef1a2a4feac2387c0013?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0926b59) will **decrease** coverage by `1.88%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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/2044?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    #2044      +/-   ##
   ==========================================
   - Coverage   67.68%   65.80%   -1.89%     
   ==========================================
     Files         181      121      -60     
     Lines        6973     3205    -3768     
     Branches      773      778       +5     
   ==========================================
   - Hits         4720     2109    -2611     
   + Misses       1970     1096     -874     
   + Partials      283        0     -283     
   ```
   
   | Flag | Coverage Ξ” | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `65.80% <100.00%> (+1.90%)` | :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/2044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | |
   |---|---|---|
   | [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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) | `100.00% <100.00%> (ΓΈ)` | |
   | [web/src/components/Upstream/components/Type.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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=) | `100.00% <0.00%> (ΓΈ)` | |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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=) | | |
   | [api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==) | | |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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==) | | |
   | [api/internal/core/server/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2NvcmUvc2VydmVyL3N0b3JlLmdv) | | |
   | [api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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==) | | |
   | [api/internal/core/storage/storage\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9zdG9yYWdlX21vY2suZ28=) | | |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | | |
   | ... and [70 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2044/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/2044?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/2044?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 [0926b59...4ab20e1](https://codecov.io/gh/apache/apisix-dashboard/pull/2044?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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   βœ”οΈ Deploy Preview for *apisix-dashboard* ready!
   
   
   πŸ”¨ Explore the source changes: 8caca166f2ca2db26a439a10f6552f96bf8cce52
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/611090c83dfed000072c695a](https://app.netlify.com/sites/apisix-dashboard/deploys/611090c83dfed000072c695a?utm_source=github&utm_campaign=bot_dl)
   
   😎 Browse the preview: [https://deploy-preview-2044--apisix-dashboard.netlify.app/](https://deploy-preview-2044--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   πŸ‘· Deploy Preview for *apisix-dashboard* processing.
   
   
   πŸ”¨ Explore the source changes: 8caca166f2ca2db26a439a10f6552f96bf8cce52
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/611090c83dfed000072c695a](https://app.netlify.com/sites/apisix-dashboard/deploys/611090c83dfed000072c695a?utm_source=github&utm_campaign=bot_dl)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #2044: fix: redirect uri when session expired

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #2044:
URL: https://github.com/apache/apisix-dashboard/pull/2044#issuecomment-894646961


   @foolishlwc Please take a look at the CI :)
   
   cc @iamayushdas to take a look also


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   βœ”οΈ Deploy Preview for *apisix-dashboard* ready!
   
   
   πŸ”¨ Explore the source changes: b39aa8d78c2714f2deffe363629835c6e5f92188
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/610e2620f7e41400080eb372](https://app.netlify.com/sites/apisix-dashboard/deploys/610e2620f7e41400080eb372?utm_source=github&utm_campaign=bot_dl)
   
   😎 Browse the preview: [https://deploy-preview-2044--apisix-dashboard.netlify.app/](https://deploy-preview-2044--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   βœ”οΈ Deploy Preview for *apisix-dashboard* ready!
   
   
   πŸ”¨ Explore the source changes: 4ab20e1c0523ed25503816aa816599768b2a279a
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/610fe66fd4d4260008a03934](https://app.netlify.com/sites/apisix-dashboard/deploys/610fe66fd4d4260008a03934?utm_source=github&utm_campaign=bot_dl)
   
   😎 Browse the preview: [https://deploy-preview-2044--apisix-dashboard.netlify.app/](https://deploy-preview-2044--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] liuxiran commented on pull request #2044: fix: redirect uri when session expired

Posted by GitBox <gi...@apache.org>.
liuxiran commented on pull request #2044:
URL: https://github.com/apache/apisix-dashboard/pull/2044#issuecomment-895113554


   merged, thanks for your contribution @foolwc 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   βœ”οΈ Deploy Preview for *apisix-dashboard* ready!
   
   
   πŸ”¨ Explore the source changes: 12fd7fc39dfd78b10fc8dc67c6b3fccedae67d52
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/610e9d8d758db300070cdf0c](https://app.netlify.com/sites/apisix-dashboard/deploys/610e9d8d758db300070cdf0c?utm_source=github&utm_campaign=bot_dl)
   
   😎 Browse the preview: [https://deploy-preview-2044--apisix-dashboard.netlify.app/](https://deploy-preview-2044--apisix-dashboard.netlify.app/?utm_source=github&utm_campaign=bot_dp)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] foolwc commented on pull request #2044: fix: redirect uri when session expired

Posted by GitBox <gi...@apache.org>.
foolwc commented on pull request #2044:
URL: https://github.com/apache/apisix-dashboard/pull/2044#issuecomment-894810368


   CI problem fixed. Please take a look and help review @juzhiyuan 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] liuxiran merged pull request #2044: fix: redirect uri when session expired

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


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #2044: fix: redirect uri when session expired

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



##########
File path: web/src/app.tsx
##########
@@ -33,7 +33,8 @@ export async function getInitialState(): Promise<{
 }> {
   const token = localStorage.getItem('token');
   if (!token) {
-    history.replace(`/user/login?redirect=${encodeURIComponent(window.location.pathname)}`);
+    const redirect = getUrlQuery('redirect');

Review comment:
       ![image](https://user-images.githubusercontent.com/2561857/128652574-9c28fdc2-a1c8-4c1d-b7b8-f26210f93e50.png)
   
   hi @foolwc , when the url did not have redirect param, we should omit it, and redirect to `/`
   




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   πŸ‘· Deploy Preview for *apisix-dashboard* processing.
   
   
   πŸ”¨ Explore the source changes: 4ab20e1c0523ed25503816aa816599768b2a279a
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/610fe66fd4d4260008a03934](https://app.netlify.com/sites/apisix-dashboard/deploys/610fe66fd4d4260008a03934?utm_source=github&utm_campaign=bot_dl)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-dashboard] netlify[bot] edited a comment on pull request #2044: fix: redirect uri when session expired

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


   πŸ‘· Deploy Preview for *apisix-dashboard* processing.
   
   
   πŸ”¨ Explore the source changes: 12fd7fc39dfd78b10fc8dc67c6b3fccedae67d52
   
   πŸ” Inspect the deploy log: [https://app.netlify.com/sites/apisix-dashboard/deploys/610e9d8d758db300070cdf0c](https://app.netlify.com/sites/apisix-dashboard/deploys/610e9d8d758db300070cdf0c?utm_source=github&utm_campaign=bot_dl)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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