Nginx settings:

/etc/nginx/sites-available/domain.name.com

include        /etc/nginx/proxy.conf;
limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;
server_tokens  off;

upstream corshapi {
        server localhost:5001;
}

add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;


limit_req  zone=one burst=10 nodelay;

location /api {
        proxy_pass         http://localhost:5001;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection keep-alive;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
}

Reference

  1. Publishing to local IIS failed to include JS files for Pages when using 'abp-script' Tag
  2. Configure IdentityServer4 behind nginx reverse-proxy
  3. Enforce HTTPS in ASP.NET Core
  4. Host ASP.NET Core on Linux with Nginx
  5. Depoloyment Problem: invalid_request
  6. ABP Framework to Azure! - Part 10
  7. Sign-in - IdentityServer 4
  8. Authorization in Angular UI

标签: none

评论已关闭