question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Envoy doesn't work anymore because of deprecated cors policy allowing

See original GitHub issue

Hey!

Today my envoy proxy stopped working after I rebuild my Docker image

I am getting that error using your example:

[2020-01-19 03:38:58.528][6][critical][main] [source/server/server.cc:94] error initializing configuration '/etc/envoy.yaml': Proto constraint validation failed (Using deprecated option 'envoy.api.v2.route.CorsPolicy.allow_origin' from file route_components.proto. This configuration will be removed from Envoy soon. Please see https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details. If continued use of this field is absolutely necessary, see https://www.envoyproxy.io/docs/envoy/latest/configuration/operations/runtime#using-runtime-overrides-for-deprecated-features for how to apply a temporary and highly discouraged override.): allow_origin: "*"
allow_methods: "GET, PUT, DELETE, POST, OPTIONS"
allow_headers: "keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout"
expose_headers: "custom-header-1,grpc-status,grpc-message"
max_age: "1728000"

Dockerfile

# This configuration will build a Docker container containing
# an Envoy proxy that routes to Google.

FROM envoyproxy/envoy-dev:latest
RUN apt-get update
COPY envoy.yaml /etc/envoy.yaml
CMD /usr/local/bin/envoy -c /etc/envoy.yaml

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

3reactions
MalcolmJRossecommented, Jan 20, 2020

This fix the issue

image

1reaction
MalcolmJRossecommented, Jan 20, 2020

you must add those 2 red blocks on your yaml file

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP route components (proto) - Envoy Proxy
CorsPolicy) Indicates that the virtual host has a CORS policy. This field is ignored if related cors policy is found in the VirtualHost.typed_per_filter_config....
Read more >
How to configure CORS in a Spring Boot + Spring Security ...
I have tested with my nodejs server that supports cors without problems by adding Access-Control-Allow-Origin: * to all requests. Like Stefan Isele has...
Read more >
Reason: CORS header 'Access-Control-Allow-Origin' missing
The response to the CORS request is missing the required Access-Control-Allow-Origin header, which is used to determine whether or not the ...
Read more >
routev3 - Go Packages
func (*CorsPolicy) Descriptor() ([]byte, []int)deprecated ... which the CORS policies will be evaluated and tracked, but not // enforced.
Read more >
Route Rules v1alpha1 (deprecated) - Istio
Envoy would choose the version based on various routing rules. ... The list of origins that are allowed to perform CORS requests.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found