Draccoz
10/14/2016 - 11:23 AM

Nginx config for wrapping js imports as html5 imports

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>")';
   }