Skip to content

Instantly share code, notes, and snippets.

@juanmaguitar
Created January 30, 2020 08:28
Show Gist options
  • Save juanmaguitar/c32a2cf182bdfb693dd54f3500879d3b to your computer and use it in GitHub Desktop.
Save juanmaguitar/c32a2cf182bdfb693dd54f3500879d3b to your computer and use it in GitHub Desktop.
const app = require('express')()
app.get('/', (req, res) => res.set('Access-Control-Allow-Origin', '*').status(400).send('ok'))
app.options('/', (req, res) => res.set('Access-Control-Allow-Origin', '*').set('Access-Control-Allow-Headers', 'Authorization').send())
app.listen(8080, () => console.log('server up'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment