Esri / resource-proxy

Proxy files for DotNet, Java and PHP.
Apache License 2.0
372 stars 321 forks source link

Mention NGINX as an alternative in README #563

Closed perryflynn closed 1 year ago

perryflynn commented 2 years ago

I've seen that the project will be deprecated.

Maybe you could mention NGINX as an alternative in the README then?

map $args $validproxydomain {
    default 0;
    ~https://arcgis\.example\.com/(server|arcgis|portal)/.+ 1;
}

map $args $proxydomain {
    default nonexistent.domain;
    ~^https?://(?<pd>[^/]+) $pd;
}

server {
    listen 80;
    listen [::]:80;
    server_name localhost;
    index index.html index.htm index.txt;

    location = /arcgisproxy {
        # abort when domain is not on whitelist
        if ($validproxydomain = 0) {
            return 400;
        }

        # proxy request
        expires off;
        proxy_buffering off;
        proxy_cache off;
        proxy_redirect off;
        proxy_read_timeout 300s;
        proxy_hide_header Location;
        proxy_set_header Host $proxydomain;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;

        proxy_pass $args;
    }
}
perryflynn commented 2 years ago

ping @andygup

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you need additional assistance please contact Esri Technical Support. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.