Skip to content

Instantly share code, notes, and snippets.

@Buslowicz
Created October 14, 2016 11:23
Show Gist options
  • Save Buslowicz/6152ed1b52d6fdb587f45ebde334d80b to your computer and use it in GitHub Desktop.
Save Buslowicz/6152ed1b52d6fdb587f45ebde334d80b to your computer and use it in GitHub Desktop.
Nginx config for wrapping js imports as html5 imports
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