curl - Forward everything over SSL in an Express.js App -
can't seem of these forward through ssl. ideally, done without wildcard certificate.
http://baredomain.com https://baredomain.com http://www.baredomain.com https://www.baredomain.com
ideally of above if typed browser or curled send traffic on https://www.baredomain.com or https://baredomain.com (just one, not both).
i've tried combo of a-records, cname records , node.js redirecting code. can't seem working. i've tried lots of different configurations , gotten close @ best.
i'm trying ideal setup node.js apps. i've been working on many , in order people able them without trouble routes listed above need work.
update: hmm... seems there's called san (subject alternative name) well.
you have 2 individual certs each of names. if goal lower cost, san cert baredomain.com www.baredomain.com san dnsname work fine.
that plus simple redirect code like
app.get('*', function(req, res, next) { if (/^www\./.test(req.headers.host)) { res.redirect(301, 'http://'+req.headers.host.replace(/^www\./,'')+req.url); } else { next(); } });
should it.
Comments
Post a Comment