Last active
February 15, 2021 20:51
-
-
Save strophy/db8aa126a04e10ff786ecc58afa8a067 to your computer and use it in GitHub Desktop.
dash platform nginx grpc config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 3010 http2; | |
limit_req zone=protect_api burst=300 nodelay; | |
limit_req_status 429; | |
location = /org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs { | |
grpc_pass grpc://127.0.0.1:3006; | |
grpc_buffer_size 128k; | |
} | |
location ~ ^/org\.dash\.platform\.dapi\.v0\.Core { | |
grpc_pass grpc://127.0.0.1:3005; | |
grpc_buffer_size 128k; | |
} | |
location ~ ^/org\.dash\.platform\.dapi\.v0\.Platform { | |
grpc_pass grpc://127.0.0.1:3005; | |
grpc_buffer_size 128k; | |
} | |
location /grpc.health.v1.Health { | |
grpc_pass grpc://127.0.0.1:3006; | |
} | |
location ~ ^/org\.dash\.platform\.dapi\.v[0-9]+\.Core { | |
add_header content-type application/grpc; | |
add_header grpc-status 12; | |
add_header grpc-message "Specified service version is not supported"; | |
return 204; | |
} | |
location ~ ^/org\.dash\.platform\.dapi\.v[0-9]+\.Platform { | |
add_header content-type application/grpc; | |
add_header grpc-status 12; | |
add_header grpc-message "Specified service version is not supported"; | |
return 204; | |
} | |
# Error responses | |
include /etc/nginx/conf.d/errors.grpc_conf; # gRPC-compliant error responses | |
default_type application/grpc; # Ensure gRPC for all error responses | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment