-2

This is how my get method looks like in my route file :

router.route('/:url')
  .get(myController.handle);

When I am testing my application I could run my code perfectly when I use this url : localhost:3000/handle/www.something.com. But when I change my url to a https it does not work, for example when I change it to : http://localhost:3000/handle/https://verisign.com/ and return not found (404) error

Nooshin
  • 178
  • 2
  • 9
  • Hi, This previous question might have the answer Enabling HTTPS on express.js https://stackoverflow.com/questions/11744975/enabling-https-on-express-js?rq=1 – German Oct 20 '21 at 21:36

1 Answers1

-1

I replaced the / characters in the url with the ascii code(%2) and now it works.

Nooshin
  • 178
  • 2
  • 9