Skip to content

Instantly share code, notes, and snippets.

@hannseman
Created July 11, 2013 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hannseman/5975556 to your computer and use it in GitHub Desktop.
Save hannseman/5975556 to your computer and use it in GitHub Desktop.
jsonp nginx support
location / {
# JSONP-support
if ( $arg_callback ) {
echo_before_body '$arg_callback(';
echo_after_body ');';
}
}
@tawanda
Copy link

tawanda commented Sep 15, 2015

I get the following error

unknown directive "echo_before_body" in /etc/nginx/sites-enabled/default:38

help?

@hannseman
Copy link
Author

Hey @tawanda, sorry for the late reply. You'll need the HTTP echo module installed. If you are running ubuntu you could install the package nginx-extras to get access to the echo module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment