Too many times redirect error

Hi,.
I am new to using Traefik. I have built a fastapi dockerised app, and I want to host it on my remote server. I got the subdomain xyz.company.com from the cloudflare mapped to the IP of my remote server.

I followed this tutorial to create a reverse proxy server with traefik deploying fastapi with traefik. After doing all the steps as mentioned I am getting too many times redirect error on the browser when I open xyz.company.com.

my traefik.toml file

[entryPoints]
  [entryPoints.web]
    address = ":80"
  [entryPoints.web.http]
    [entryPoints.web.http.redirections]
      [entryPoints.web.http.redirections.entryPoint]
        to = "websecure"
        scheme = "https"

  [entryPoints.websecure]
    address = ":443"

[accessLog]

[log]
    level = "DEBUG"

[providers]
  [providers.docker]
    exposedByDefault = false

[certificatesResolvers.letsencrypt.acme]
  email = "prashan.sharma@gmail.com"
  storage= "acme.json"
  [certificatesResolvers.letsencrypt.acme.httpChallenge]
    entryPoint = "web"

my docker-compose.yml file

version : '3.8'

services:
  web:
    build: ./services/api

    expose:
      - 8000

    restart: 'always'

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.fastapi.rule=Host(`xyz.company.com`)"
      - "traefik.http.routers.fastapi.tls=true"
      - "traefik.http.routers.fastapi.tls.certresolver=letsencrypt"

  traefik:
    image: traefik:v2.3
    ports:
      - "80:80"
      - "443:443"

    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./:/etc/traefik"

can anyone suggest , how can I fix this issue?