Nchan — 訂閱與發佈時的驗證


upstream my_app {

location ~ /pubsub/auth/(\w+)$ {
nchan_channel_id $1;
nchan_authorize_request /auth;
nchan_channel_group test;

location = /auth {
proxy_pass http://my_app/pubsub_authorize;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Subscriber-Type $nchan_subscriber_type;
proxy_set_header X-Publisher-Type $nchan_publisher_type;
proxy_set_header X-Prev-Message-Id $nchan_prev_message_id;
proxy_set_header X-Channel-Id $nchan_channel_id;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Forwarded-For $remote_addr;



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store