|
|
|
@ -3,7 +3,7 @@ const app = express()
|
|
|
|
|
const port = 4003
|
|
|
|
|
|
|
|
|
|
app.get('/', (req, res, next) => {
|
|
|
|
|
if (req.headers['user-agent'].toLowerCase().startsWith('Twitterbot/')) {
|
|
|
|
|
if (req.headers['user-agent'].toLowerCase().startsWith('twitterbot/')) {
|
|
|
|
|
console.log('found a twitter request lol')
|
|
|
|
|
res.redirect('https://twitter.com/elonmusk')
|
|
|
|
|
return
|
|
|
|
@ -31,7 +31,7 @@ app.get('/:base64forTheWorld/:base64forTwitter/:randomtextforcache?', (req, res)
|
|
|
|
|
res.status(400).send('idk what to do with this url! someone broke something.')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (req.headers['user-agent'].toLowerCase().startsWith('Twitterbot/')) {
|
|
|
|
|
if (req.headers['user-agent'].toLowerCase().startsWith('twitterbot/')) {
|
|
|
|
|
console.log('found a twitter request lol')
|
|
|
|
|
res.redirect(linkForTwitter)
|
|
|
|
|
return
|
|
|
|
|