title: Configuring uWSGI to not interpret PATH_INFO
body: <p>How can I configure uwsgi to pass in the request path unmodified as <code>PATH_INFO</code>? I.e. if there is a request <code>https://example.com/foo%5F/../bar?x=y</code>, I want <code>PATH_INFO</code> to be literally <code>/foo/../%5Fbar</code>, and not <code>/_bar</code>.</p>
  
  <p>The <a href="https://uwsgi-docs.readthedocs.io/en/latest/Snippets.html#multiple-flask-apps-in-different-mountpoints" rel="nofollow noreferrer">uWSGI documentation says</a> <em>uWSGI is able to rewrite request variables in lot of advanced ways</em>, but I am unable to find any way to set individual request variables, at least not without modifying the source code of uwsgi.</p>
  
  <p>The reason I want to do is that I have a frontend application which takes user input and then sends a request to <code>http://backend.app/get/USER_INPUT</code>. Trouble is, there is an uwsgi in between, and when the user input is <code>../admin/delete-everything</code>, the request goes to <code>http://backend.app/admin/delete-everything</code>!<br/>
  (This uwsgi change I desire will not be the only fix; the frontend app should certainly validate user input, and the backend app should not offer <code>/admin</code> to the frontend app in the first place. But as a measure of defense-in-depth, I'd like my requests to pass uwsgi unmodified.)</p>
  
  <p>I am running bare uWSGI without nginx, i.e. <code>uwsgi --http 0.0.0.0:8000 --wsgi-file myapp/wsgi.py --master --processes 8 --threads 2</code>.</p>
  
  <p>For what it's worth, the backend app that looks into <code>PATH_INFO</code> is Django.</p>