Middleware to embbed CGI scripts