diff --git a/src/routes/call-by-meaning-routes.js b/src/routes/call-by-meaning-routes.js index c461b24..31394c1 100644 --- a/src/routes/call-by-meaning-routes.js +++ b/src/routes/call-by-meaning-routes.js @@ -68,7 +68,7 @@ router.post("/call", (req, res) => { } return request.post({ - uri: `${req.protocol}://${req.get("host")}${req.originalUrl[0]}gbm/search/`, + uri: "/gbm/search/", form: { inputConcepts, outputConcepts }, }, (err, response, body) => { if (err) console.error(err); diff --git a/src/routes/get-by-meaning-routes.js b/src/routes/get-by-meaning-routes.js index bfa369f..c44f24b 100644 --- a/src/routes/get-by-meaning-routes.js +++ b/src/routes/get-by-meaning-routes.js @@ -42,7 +42,7 @@ router.post("/search", (req, res) => { break; } - request.get(`${req.protocol}://${req.get("host")}${req.originalUrl[0]}gbn/c/${outputConcepts[i]}`, (err2, response, body) => { + request.get(`/gbn/c/${outputConcepts[i]}`, (err2, response, body) => { if (response.statusCode !== 200) { return res.status(418).send(`Could not interpret the concept: ${outputConcepts[i]}`); } @@ -72,7 +72,7 @@ router.post("/search", (req, res) => { break; } - request.get(`${req.protocol}://${req.get("host")}${req.originalUrl[0]}gbn/c/${inputConcepts[j]}`, (err3, response2, body2) => { + request.get(`/gbn/c/${inputConcepts[j]}`, (err3, response2, body2) => { if (response2.statusCode !== 200) { return res.status(418).send(`Could not interpret the concept: ${inputConcepts[j]}`); }