
  ###### 监管平台转发
  location  ^~ /uas {
        #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
        add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
        #开启HTTP严格传输安全HSTS
        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
        proxy_pass http://localhost:30500;
        client_max_body_size 5120m;
        client_body_buffer_size 5120m;
        client_body_timeout 6000s;
        proxy_send_timeout 10000s;
        proxy_read_timeout 10000s;
        proxy_connect_timeout 600s;
        proxy_max_temp_file_size 5120m;
        proxy_request_buffering on;
        proxy_buffering off;
        proxy_buffer_size 4k;
        proxy_buffers 4 12k;
        proxy_set_header Host fake-domain.zjejpt-uas.io;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

  location / {
      #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
      add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
      #开启HTTP严格传输安全HSTS
      add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
      proxy_pass http://localhost:30500;
      client_max_body_size 5120m;
      client_body_buffer_size 5120m;
      client_body_timeout 6000s;
      proxy_send_timeout 10000s;
      proxy_read_timeout 10000s;
      proxy_connect_timeout 600s;
      proxy_max_temp_file_size 5120m;
      proxy_request_buffering on;
      proxy_buffering off;
      proxy_buffer_size 4k;
      proxy_buffers 4 12k;
      proxy_set_header Host fake-domain.zjyd.io;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

   location /_AMapService/v4/map/styles {
           #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
           add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
           #开启HTTP严格传输安全HSTS
           add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
           set $args "$args&jscode=cf66cea95bdcdfcf8048456b36f357a1";
           proxy_pass https://webapi.amap.com/v4/ap/styles;
   }

   location /_AMapService/ {
       #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
       add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
       #开启HTTP严格传输安全HSTS
       add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
       set $args "$args&jscode=cf66cea95bdcdfcf8048456b36f357a1";
       proxy_pass https://restapi.amap.com/;
   }

  location /rtc/v1/ {
        #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
        add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
        #开启HTTP严格传输安全HSTS
        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
        add_header Access-Control-Allow-Headers X-Requested-With;
        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
        proxy_pass http://192.168.10.3:30985/rtc/v1/;
  }



###  视频国标GB28181  ###

#  location /zlm/flv/ {
#        #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
#        add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
#        #开启HTTP严格传输安全HSTS
#        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
#        add_header Access-Control-Allow-Headers X-Requested-With;
#        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
#        proxy_pass http://192.168.10.25:7088/;
#  }
#  location /zlm/hls/ {
#        #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
#        add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
#        #开启HTTP严格传输安全HSTS
#        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
#        add_header Access-Control-Allow-Headers X-Requested-With;
#        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
#        proxy_pass http://192.168.10.25:7088/zlm/hls/;
#  }
#  location /index/api/ {
#        #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
#        add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
#        #开启HTTP严格传输安全HSTS
#        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
#        add_header Access-Control-Allow-Headers X-Requested-With;
#        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
#        proxy_pass http://192.168.10.25:7088/index/api/;
#  }


  #location /video_feed {
  #      proxy_pass http://192.168.10.12:5000;
  #      proxy_http_version 1.1;
  #      proxy_set_header Upgrade $http_upgrade;
  #      proxy_set_header Connection "upgrade";
  #      proxy_set_header Host $host;
  #      proxy_cache_bypass $http_upgrade;
  #}
  #location /video_person {
  #      proxy_pass http://192.168.10.12:5001;
  #      proxy_http_version 1.1;
  #      proxy_set_header Upgrade $http_upgrade;
  #      proxy_set_header Connection "upgrade";
  #      proxy_set_header Host $host;
  #      proxy_cache_bypass $http_upgrade;
  #}
  #location /video {
  #    #######Cookie 标记为 HttpOnly 缺少、不一致或相互矛盾属性的 Cookie 漏洞修复
  #    add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
  #    #开启HTTP严格传输安全HSTS
  #    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
  #    alias /data/test/;
  #    index 10.mp4;
  #}

  #location ~ ^/\w*/actuator/ {
  #    return 403;
  #}

  location ~ ^/.*/(actuator|swagger-resources|api-docs|health).* {
      add_header Set-Cookie "sessionid=aFM9PPvmF7kpynnx; HttpOnly; Secure; Path=/; SameSite=Lax;";
      return 404;
  }
