I set up an “Azure CDN premium from Verizon” profile and created an endpoint with the configurations shown below.
Name: my-public-nexus-11111 Other configurations: enter image description here
I wanted to download an artifact from the wso2 public nexus repository (artifact link: https://maven.wso2.org/nexus/content/groups/wso2-public/org/wso2/carbon/org.wso2.carbon.core/4.4.10/org.wso2.carbon.core-4.4.10.jar ). But when I used my CDN endpoint to download this artifact, it gives me a “502 Bad gateway” error. (Link with the CDN endpoint: https://my-public-nexus-11111.azureedge.net/nexus/content/groups/wso2-public/org/wso2/carbon/org.wso2.carbon.core/4.4.10/org.wso2.carbon.core-4.4.10.jar )
What is the reason for this behavior?
Also just to check whether I‘ve misconfigured something when creating the endpoint, I created another endpoint with the below configurations:
Name: my-test-mvn-central-without-path oher configurations: enter image description here
Then I tried to download this artifact with the CDN endpoint link: https://repo1.maven.org/maven2/io/siddhi/siddhi-core/5.0.1/siddhi-core-5.0.1.jar
This can be achieved. The link with the CDN endpoint: https://my-test-mvn-central-without-path.azureedge.net/maven2/io/siddhi/siddhi-core/5.0.1/siddhi-core-5.0.1.jar
Therefore why the previous CDN endpoint gave me 502 bad gateway error (When configured wso2 public nexus repo as the origin) ?
Also, is it possible to send a request header to the backend?
(Please note that CDN links might not work because I need to stop CDN endpoints to avoid unnecessary costs)
<<<<<<<<<>>>>>>>>>>>
I tried to reproduce the same in my environment like below
I created an Azure CDN endpoint with premium verzion like below:
When I used my CDN endpoint to download artifact, it gives me a “502 Bad gateway” error what is the reason for this behavior?
This error may occur when an HTTP protocol failure occurs between a server and an HTTP proxy. It can't be parsed when customer origin server returns an invalid response to an edge server.
Try to use ipconfig /flushdns
Try to disable Temporarily disable CDN or firewall.
In control Panel -> System and Security -> security and maintenance -> Turn Windows Firewall on or off -> Turn off Windows Firewall
As per Anton Kucer check whether Service Name Indication is turned on at your origin and try to disable SNI setup for SSL binding to resolve this issue. Verify the network connectivity and check whether necessary ports and protocols are open and configured properly.