Drew attention to the fact that there are two links to the same page.

site.ru/url/ site.ru/url 

I process it in router

 router.get('/url/', require('./url').get); 

Previously, it seemed that express.js strictly corresponded to the url, but now it is possible to open the same pages with a slash at the end and without it, and this is like duplicates.

Are there any express settings to strictly match the URL? Or, again, have to do a bust url?

    1 answer 1

    When you create a router:

     var router = express.Router({strict: true }); 

    Or turn it on when the application is created:

     app.enable('strict routing'); 

    By default, express. Router considers urls / foo and / foo / to be the same. The parameter above just says that this is a different url.

    • Thank you, it works! - webphp