forked from brocaar/chirpstack-application-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main.go: Make it possible to run gRPC on different port than REST/HTTP
As described in grpc/grpc-go#555, it is not possible to run gRPC without security when using net/http and serveHTTP. This creates a problem if you want to run lora-app-server behind a proxy which terminates TLS. This problem is solved by adding three new options: GRPC_BIND, GRPC_TLS_CERT and GRPC_TLS_KEY. When GRPC_BIND is set, the gRPC service will bind to this ip:port instead of HTTP_BIND which makes it possible to leave HTTP_TLS_CERT and HTTP_TLS_KEY unset. GRPC_TLS_CERT and GRPC_TLS_KEY are optional and will only be used if GRPC_BIND is set.
- Loading branch information
Showing
1 changed file
with
86 additions
and
20 deletions.
There are no files selected for viewing
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