node.js - How secure is to use req.param secure? -


i building rest api app , wondering if req.param secure user can alter url when getting results simple request.

for example :

app.get('/instruction/:url', function (req, res) {   var url = req.params.url;   ...stuff here... }); 

i retrieving data url inserted in api wondering how make sure url introduced secure , not going have injection server.

:url url entered example:

the url parameter used "https.request", example rest api url

http://localhost/instruction/https://restcountries.eu/rest/v1/all

any suggestion ? enough simple parse string ?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -