Using FastAPI to create server endpoints. However, the endpoint url never loads.
Yes, here it is. Let me know if this is what you are referring to or something else?
service name: server
public url: https://server-hawk.koyeb.app/
Everything looks fine on my side. Can you elaborate on the issue you are facing and provide steps to reproduce?
So for health check purposes, what I’ve done is https://server-hawk.koyeb.app/ping, should return/display “pong” on the screen. however, that’s not the case. whenever, I visit the url it just goes goes into forever loading.
It works well for me, pong is returned as expected.
Can you try with curl?
❯ curl -i -vvv https://server-hawk.koyeb.app/ping
* Trying [2606:4700:10::6816:4fbe]:443...
* Connected to server-hawk.koyeb.app (2606:4700:10::6816:4fbe) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server accepted h2
* Server certificate:
* subject: CN=*.koyeb.app
* start date: Jan 23 22:14:41 2024 GMT
* expire date: Apr 22 22:14:40 2024 GMT
* subjectAltName: host "server-hawk.koyeb.app" matched cert's "*.koyeb.app"
* issuer: C=US; O=Let's Encrypt; CN=E1
* SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://server-hawk.koyeb.app/ping
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: server-hawk.koyeb.app]
* [HTTP/2] [1] [:path: /ping]
* [HTTP/2] [1] [user-agent: curl/8.4.0]
* [HTTP/2] [1] [accept: */*]
> GET /ping HTTP/2
> Host: server-hawk.koyeb.app
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/2 200
HTTP/2 200
< date: Tue, 30 Jan 2024 14:03:31 GMT
date: Tue, 30 Jan 2024 14:03:31 GMT
< content-type: application/json
content-type: application/json
< content-length: 6
content-length: 6
< x-envoy-upstream-service-time: 162
x-envoy-upstream-service-time: 162
< x-koyeb-backend: sfo1
x-koyeb-backend: sfo1
< x-b3-traceid: 49f67f005eff999e
x-b3-traceid: 49f67f005eff999e
< x-koyeb-glb: fra1
x-koyeb-glb: fra1
< cf-cache-status: DYNAMIC
cf-cache-status: DYNAMIC
< server: cloudflare
server: cloudflare
< cf-ray: 84da423e683ab373-PRG
cf-ray: 84da423e683ab373-PRG
< alt-svc: h3=":443"; ma=86400
alt-svc: h3=":443"; ma=86400
<
* Connection #0 to host server-hawk.koyeb.app left intact
"pong"%