I have a route api/v1/track and I want to send some data (JSON) by given track ID , but I want to send response for only my frontend requests or my mobile app , not any other request from anywhere !
I am using Node JS and Express , I implemented some JWT config for authentication of users with tokens but I do not know how to limit this access for this route without any pre created token
app.get("/track/:ID" , (req , res) => {
// Block forbidden requests ...
// If request is from my specific resource ( Frontend or App ) then :
res.json(something)
})
I just do not want to let people use my API information , I also need that before user be authenticated for sending data to my Vue SPA
Thank you