Created
March 26, 2023 06:41
-
-
Save ixonae/0df5004ab97fa6d6942ae3cd8bad358a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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