javascript - Nodejs Link Shortener - Using an API -
Working on a new app that includes link redirects based on a shortlink feature has three parts to apply:
- To add back-office login and new short link for customers (uses APIs)
- Nodes applications that receive requests (when using ADI
- API only
I use Basic Ath to secure the API I intend to (which
question how to maintain security requires an SSL connection), but I want the small URL to be a non-secure web address (http). Can I have a link for a few links, but can still make a secure connection to the API, to see how to redirect the shortlink again?
Do I have anyway http http in prox
Note: I'm hosting my application on Heroes.
/ Div>
, if the client conn acts with HTTP it will use http if you want to automatically replace it with https, then its use:
app .get ('/ api / *', function (rick, ridge, next)) (if (req.headers ['x -prord-proteos']! = 'Https') res.redirect (' https: //mypreferreddomain.com'+req.url) and Next () / * Continue on other routes if we are not redirecting)
Comments
Post a Comment