add missing ua compatibility api

This commit is contained in:
Stewart Allen 2020-06-02 20:28:48 -04:00
commit c4814f6a9e

5
app.js
View file

@ -414,6 +414,11 @@ function handleVersion(req, res, next) {
}
function handleOptions(req, res, next) {
try {
req.app.ua = agent.parse(req.headers['user-agent'] || '');
} catch (e) {
logger.log("ua parse error on : "+req.headers['user-agent']);
}
if (req.method === 'OPTIONS') {
addCorsHeaders(req, res);
res.end();