vercel/serve-handler

[feature request] wanna to add jsonp

songlairui opened this issue · 1 comments

how to
get /xxx.js?_callback=fn
return fn([js-file-data])

with serve-handler

shameless self-promotion alert:
this feature is available in my @warren-bank/serve fork of serve

demo:

  • here: set content-type response header
  • here: process request using a perl cgi-bin script
  • here: is the perl cgi-bin script
  • here: is the documentation for using cgi-bin scripts

fyi:

  • the --cors option injects response headers that will allow external websites to directly request static json resources