Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function handler(event) {
var request = event.request;
var uri = request.uri;
if (uri.endsWith('/')) {
request.uri += 'index.html';
}
else if (!uri.includes('.')) {
request.uri += '/index.html';
}
return request;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment