Skip to content

Commit

Permalink
defaultUrl as alternate record
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioBeneditto committed Mar 2, 2022
1 parent 46768a5 commit 2355638
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ app.use('/favicon.ico', express.static('favicon.ico'));

// Points to API URL, based on platform (local or Heroku)
app.get('/', (req, res) => {
res.json({'newUrl': req.get('host') + '/api'})
res.json({
'newUrl': req.get('host') + '/api',
'defaultUrl': req.headers.host + '/api'
})
})

// Get random HTTP code from allStatus object
Expand Down

0 comments on commit 2355638

Please sign in to comment.