I’m working on a web application structured as a microservice within a larger application. Our architecture requires changing the paths after a base URL where our project is hosted.
I have updated the publicPath in my vue.config.js file as follows:
module.exports = { publicPath: '/tutor/' };
The problem arises when a user lands on our hosted project and attempts to access this microservice (tutor) without a trailing slash, like this: http://example.com/tutor. This throws an error instead of properly routing to the /tutor microservice.
Here is what I have tried so far:
- Changed the public path to ‘/tutor’ (without the trailing slash)
- Deployed both versions, still get the same error.
Error:Error screenshot
Additional Information
- Vue.js Version: 2.6.11
- Vue Router Version: 3.2.0
- Router is in history mode
Thank you for your help!
Olabode-Odebunmi Oluwaseeni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.