Skip to content

Conversation

@ikun-Lg
Copy link
Contributor

@ikun-Lg ikun-Lg commented Dec 20, 2025

Please provide a description of this PR:

  1. Fixed router guard parameter order: main.ts- Fixed router guard implementation
  2. Added comprehensive 401 handling in HTTP response interceptor: request.ts- Added 401 redirect logic to HTTP interceptor

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • Docs
  • Installation
  • User Experience
  • Dubboctl
  • Console
  • Core Component

Please check any characteristics that apply to this pull request.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes authentication handling by correcting the router guard parameter order and improving 401 unauthorized response handling. The changes ensure users are properly redirected to the login page when their session expires.

  • Fixed router guard parameters from incorrect (from, to, next) to correct (to, from, next) order
  • Moved 401 error handling from success response handler to error response handler where it belongs
  • Added comprehensive redirect logic with fallback to window.location.href

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ui-vue3/src/main.ts Fixed router guard parameter order and path check logic; removed unused imports
ui-vue3/src/base/http/request.ts Relocated 401 handling to error interceptor with redirect logic and necessary imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ikun-Lg and others added 2 commits December 20, 2025 21:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…d enhance error logging

- Introduced new JavaScript files for YAML and XML syntax highlighting and editing capabilities.
- Added a new component for updating YAML configurations with a structured editor interface.
- Updated the index.html to reference the new JavaScript bundle for improved functionality.
- Enhanced the HTTP request module to log errors during redirection on 401 responses for better debugging.
@sonarqubecloud
Copy link

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 87 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@robocanic robocanic left a comment

Choose a reason for hiding this comment

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

LGTM.

@robocanic robocanic merged commit c8d6100 into apache:develop Dec 21, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants