这是客户端发起的请求
这里是SignalR集线器中的代码 客户端请求链接之后我的Console.Out.WriteLineAsync打印都没有走
这里是加Token添加到SignalR的集线器中
以下是Nginx配置的conf文件:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
# dotnet core API
upstream dotnetblogserver1 {
server 127.0.0.1:5000;
}
server {
listen 8561;
server_name coreapi.uwladmin.club;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
proxy_pass http://localhost:5000;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
#vue admin listen uwladmin.club
server {
listen 8562;
server_name www.uwladmin.club;
location / {
#rewrite .* /index.html break;
root C:\WebSite\UwlAdmin\dist;
index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/ {
rewrite ^.+apb/?(.*)$ /$1 break;
#include uwsgi_params;
proxy_pass http://localhost:8561;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api2/ {
include uwsgi_params;
proxy_pass http://localhost:8561;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}