Hello guys,
I’d like to return CORS with Access-Control-Expose-Headers header set to ‘grpc-message,grpc-status’.
As you can see, I’m using caddy for gRPC-web proxying… And I need these headers to be exposed…
My current Caddyfile’s domain’s cors config:
cors / {
origin http://<my_domain>.com
methods GET,POST,PUT,OPTIONS
allow_credentials false
max_age 3600
allowed_headers keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
exposed_headers grpc-status,grpc-message
}
(Pretty much copy-paste from github getting-started section…)
But when I run caddy container… a try to use grpc client to send message to grpc server (to Caddy actually) I receive response in which the required header is set to something else… (probably Caddy just sets Access-Control-Expose-Headers to other visible headers…) but mine value is not listed there… and I also noticed different CORS responses between pre-flight requests and normal ones…
Thanks in advance…