It appears Google has somehow managed to crawl and index the /user/password page (according to Google Search Console) - is it possible to set it to "noindex" (without using Node noindex)?

Comments

I`m use JS:

var path = window.location.pathname.substring(1);
var noindex = ['user','search'];
noindex.forEach(el => {
    if (path.indexOf(el) > -1) {
        setNoindex();
        return;
    } 
});
function setNoindex() {
    var meta = document.createElement('meta');
    meta.name = 'robots';
    meta.setAttribute('content', 'noindex');
    document.getElementsByTagName('head')[0].appendChild(meta);
}