Created
October 14, 2016 11:23
-
-
Save Buslowicz/6152ed1b52d6fdb587f45ebde334d80b to your computer and use it in GitHub Desktop.
Nginx config for wrapping js imports as html5 imports
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
location ~/html-imports/(.+)$ { | |
set $path $1; | |
default_type 'text/html'; | |
content_by_lua 'ngx.say("<script src=\'", ngx.var.path, ".js\'></script>")'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment