[GH-ISSUE #1561] Address Bar Updated Incorrectly #497

Closed
opened 2026-03-16 15:40:51 +03:00 by kerem · 2 comments
Owner

Originally created by @dob99 on GitHub (Mar 24, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1561

Description
When the application is served from a directory other than root and a change is made to the URL or inputs, the path is removed from the URL.

To Reproduce

  1. Edit the file nuxt.config.js
  2. Add the following block inside export default:
    router: { base: '/hoppscotch/' },
  3. Run the application and go to http://localhost:3000/hoppscotch
  4. Enter any URL (or change the input parameters)
    => The URL has been altered to reflect the changes, but "/hoppscotch" has been removed from it.

Expected behavior
Any path components in the URL will be maintained when updating it

Environment:

  • OS: Windows 10
  • Browser: Chrome
  • Version: 89.0.4389.90
Originally created by @dob99 on GitHub (Mar 24, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1561 **Description** When the application is served from a directory other than root and a change is made to the URL or inputs, the path is removed from the URL. **To Reproduce** 1. Edit the file nuxt.config.js 2. Add the following block inside _export default_: `router: { base: '/hoppscotch/' },` 3. Run the application and go to http://localhost:3000/hoppscotch 4. Enter any URL (or change the input parameters) => The URL has been altered to reflect the changes, but "/hoppscotch" has been removed from it. **Expected behavior** Any path components in the URL will be maintained when updating it **Environment:** - OS: Windows 10 - Browser: Chrome - Version: 89.0.4389.90
kerem closed this issue 2026-03-16 15:40:57 +03:00
Author
Owner

@liyasthomas commented on GitHub (Mar 24, 2021):

Thanks for reporting this issue. We're working on a fix.

<!-- gh-comment-id:805812125 --> @liyasthomas commented on GitHub (Mar 24, 2021): Thanks for reporting this issue. We're working on a fix.
Author
Owner

@liyasthomas commented on GitHub (Mar 24, 2021):

@dob99 pull latest changes - you should now be able to define a custom router.base property in nuxt.config.js file and Hoppscotch will respect that while setting query parameters.

Example:

nuxt.config.js


export default {
  ...
  ...

  router: { base: "/hoppscotch/" },

  ...
  ...

}

Read more about Nuxt router property ->

If you're planing to self-host Hoppscotch for your company / workplace - please consider sponsoring our project on GitHub to help us sustain project development. Thanks.

<!-- gh-comment-id:805814604 --> @liyasthomas commented on GitHub (Mar 24, 2021): @dob99 pull latest changes - you should now be able to define a custom `router.base` property in `nuxt.config.js` file and Hoppscotch will respect that while setting query parameters. Example: `nuxt.config.js` ``` export default { ... ... router: { base: "/hoppscotch/" }, ... ... } ``` [Read more about Nuxt router property ->](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-router/) If you're planing to self-host Hoppscotch for your company / workplace - [please consider sponsoring our project on GitHub](https://github.com/sponsors/hoppscotch) to help us sustain project development. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#497
No description provided.