Minor fix to nginx dockerfile

This commit is contained in:
Stanley Cheung 2018-08-07 18:12:37 -07:00
parent ff67114739
commit 3b4bfe2280
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,9 @@
FROM grpc-web:prereqs
RUN cd /github/grpc-web/net/grpc/gateway/examples/echo && \
sed -i 's/localhost:9090/echo-server:9090/g' nginx.conf
RUN cd /github/grpc-web && \
make standalone-proxy

View File

@ -21,7 +21,7 @@ http {
root /var/www/html;
}
location / {
grpc_pass echo-server:9090;
grpc_pass localhost:9090;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';