add skynet-portal-api header
This commit is contained in:
parent
0fbed274b9
commit
69940ffc27
|
@ -11,4 +11,4 @@ if ($request_method = 'OPTIONS') {
|
|||
more_set_headers 'Access-Control-Allow-Origin: *';
|
||||
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
|
||||
more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
||||
more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range,Skynet-File-Metadata,Skynet-Skylink';
|
||||
more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range,Skynet-File-Metadata,Skynet-Skylink,Skynet-Portal-Api';
|
||||
|
|
|
@ -25,6 +25,7 @@ worker_processes 1;
|
|||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
env SKYNET_PORTAL_API; # declare env variable to use it in config
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
|
@ -62,5 +63,8 @@ http {
|
|||
|
||||
#gzip on;
|
||||
|
||||
# include skynet-portal-api header on every request
|
||||
header_filter_by_lua 'ngx.header["Skynet-Portal-Api"] = os.getenv("SKYNET_PORTAL_API")';
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
|
|
Reference in New Issue