summaryrefslogtreecommitdiff
path: root/netlify/edge-functions/rewrite.js
blob: 7a56a7fb3bc8b2c6f4d927293fb1ecf37fd0e22b (plain)
1
2
3
4
5
6
7
8
export default async (request, context) => {
    const path = context.geo?.country?.code === 'AU' ? '/edge/australia' : '/edge/not-australia';
    return Response.redirect(new URL(path, request.url));
};

export const config = {
    path: '/edge'
};