Skip to content

Instantly share code, notes, and snippets.

@ixonae
Created March 26, 2023 06:41
Show Gist options
  • Save ixonae/0df5004ab97fa6d6942ae3cd8bad358a to your computer and use it in GitHub Desktop.
Save ixonae/0df5004ab97fa6d6942ae3cd8bad358a to your computer and use it in GitHub Desktop.
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