Skip to content

Instantly share code, notes, and snippets.

@saml
Created December 19, 2012 17:45
Show Gist options
  • Save saml/4338687 to your computer and use it in GitHub Desktop.
Save saml/4338687 to your computer and use it in GitHub Desktop.
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
server {
listen 9001;
location /anon {
default_type 'application/json';
xss_get on;
xss_callback_arg 'callback';
root 'htdocs';
content_by_lua_file 'lua/anon.lua';
}
}
}
if ngx.req.get_method() == 'POST' then
ngx.say('yay')
else
--how can I let xss module handle this?
--ngx.say('nay')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment