mirror of
https://github.com/maxboeck/webring
synced 2024-11-25 12:50:21 +00:00
8 lines
243 B
JavaScript
8 lines
243 B
JavaScript
import { redirect, getNext, getRandom } from './common/utils'
|
|
|
|
exports.handler = function(event, context, callback) {
|
|
const { referer } = event.headers
|
|
const site = getNext(referer) || getRandom()
|
|
|
|
callback(null, redirect(site))
|
|
}
|