Github's Codespaces

I am facing port forwarding issues with my application. I get a 502 error, seemingly a CORS issue as I get a strict-origin-when-cross-origin referer policy. However, it seems that the request is never reaching my app, since I do not see any logs, even after adding Corsica to help deal with CORS by with a wildcard origin setting.

Does anyone have an Idea on how I can fix that?

devcontainer.json

"name": "BBLeagues development environment",
  "dockerComposeFile": "./docker-compose.yml",
  "workspaceFolder": "/workspace/bbleagues",
  "service": "bbleagues",
  "shutdownAction": "stopCompose",
  "forwardPorts": [
    "4000:4000",
    "4001:4001"
  ],
  "customizations": {
    "vscode": {
      "extensions": [
        "bradlc.vscode-tailwindcss",
        "JakeBecker.elixir-ls",
        "iampeterbanjo.elixirlinter",
        "phoenixframework.phoenix",
        "ms-azuretools.vscode-docker",
        "Codeium.codeium",
        "github.vscode-github-actions",
        "eamodio.gitlens",
        "hashicorp.terraform",
        "ms-vscode.test-adapter-converter",
        "hbenl.vscode-test-explorer",
        "dracula-theme.theme-dracula"
      ]
    }
  },
  "features": {
    "ghcr.io/devcontainers/features/common-utils:2": {
      "version": "latest"
    }
  }
}

Dockerfile

ARG ELIXIR_VERSION=1.16
FROM elixir:${ELIXIR_VERSION}-slim

RUN apt-get update && \
  apt-get install -y git && \
  apt-get install -y postgresql-client && \
  apt-get install -y inotify-tools && \
  apt-get install -y curl && \
  apt-get install -y wget && \
  apt-get install -y gnupg2 && \
  apt-get install -y dirmngr && \
  apt-get install -y gpg && \
  apt-get install -y gawk

# RUN git clone https://github.com/asdf-vm/asdf.git $HOME/.asdf --branch v0.8.1 && \
#   echo '. $HOME/.asdf/asdf.sh' >> $HOME/.bashrc && \
#   echo '. $HOME/.asdf/asdf.sh' >> $HOME/.profile

# ENV PATH /home/asdf/.asdf/bin:/home/asdf/.asdf/shims:$PATH

RUN mix local.rebar --force
RUN mix local.hex --force

EXPOSE 4000
EXPOSE 4001

docker-compose.yml

version: "3.8"
services:
  bbleagues:
    build:
      context: ../
      dockerfile: .devcontainer/devcontainer.Dockerfile
    environment:
      MIX_ENV: dev
    depends_on:
      - db
    ports:
      - 4000:4000
      - 4001:4001
  db:
    image: postgres:16.1-alpine
    restart: always
    ports:
      - 5432:5432
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_HOST_AUTH_METHOD: trust
      PGDATA: /var/lib/postgresql/data/pgdata
    volumes:
      - postgres-data:/var/lib/postgresql/data
volumes:
  postgres-data: