A simple URL shortener built using Meteor.
Environment variables are specified in startup.js.
- POST data must be sent as x-www-form-urlencoded
- It accepts requests only from origin matching RECEIVE_DOMAIN environment variable
- POST to /new with key=RECEIVE_KEY and url=URL for a link
- POST to /stats with key=RECEIVE_KEY and slug=xxxxx (shortened url extension) for stats
- POST to /delete with key=RECEIVE_KEY and slug=xxxxx to delete a link
- All POST responses are returned as JSON objects
- When accessing site directly, or when a link isn’t found, it redirects to REDIRECT_URL
- There is no URL validation in this code