Score:0

Nginx case insensitive reverse proxy with Chinese filename

so flag

I am setting up Nginx as a reverse proxy server. The back-end server is IIS. I want to match URL case insensitively (match app, App or APP etc.), here is my Nginx config file:

    location ~* /app/(.*) {
        proxy_pass http://192.168.1.192/app/$1$is_args$args;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
    }

It works well when the filename doesn't contain any Chinese character, but fails when the filename contains Chinese character. For example, when I request /app/中文.png, I'll see GET /app/銝剜?.png in the back-end server log file.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.