Skip to content

fix: show last path segment in network name for URLs ending with /#547

Open
AsukaShikinamiLangley wants to merge 1 commit into
liriliri:masterfrom
AsukaShikinamiLangley:fix/network-name-display
Open

fix: show last path segment in network name for URLs ending with /#547
AsukaShikinamiLangley wants to merge 1 commit into
liriliri:masterfrom
AsukaShikinamiLangley:fix/network-name-display

Conversation

@AsukaShikinamiLangley

Copy link
Copy Markdown

Summary

Fix getFileName to correctly return the last path segment for URLs ending with /.

Previously:

  • https://a.com/xxx/query/ returned a.com (hostname)
  • https://a.com/xxx/query/?a=1 returned ?a=1

Now:

  • https://a.com/xxx/query/ returns query/
  • https://a.com/xxx/query/?a=1 returns query/?a=1

This makes the Network panel's name column show the actual API path instead of just the hostname or query string.

Fixes #546

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.

请求为"/"结尾时network显示的name不正确

1 participant