[edit] uwsgi_string

syntax: uwsgi_string string

default: none

context: server, location

append a string to a uwsgi request

Example (for a uwsgi compatible server that support the eval modifier as uWSGI)

  location / {
    uwsgi_pass unix:/var/run/example.com.sock;
    uwsgi_pass_request_headers off;
    uwsgi_pass_request_body off;
    uwsgi_string "
 
import uwsgi
 
uwsgi.start_response('200 OK', [('Content-type','text/plain')])
total = 30+22
uwsgi.send("30 + 22 = %d" % total)
 
";
 
    uwsgi_modifier1 22;
    uwsgi_modifier2 0;
 
  }

Module: HttpUwsgiModule