_stcore/health doesn't change port when running on different port

Summary

I am trying to run a minimal streamlit app on port 3000 (localhost). I set up a config.toml file with a different server.port configuration. Everytime I start I get the following error messages in my browser console:
WebsocketConnection Attempting to connect to http://localhost:8501/_stcore/health.
GET http://localhost:8051/_stcore/health net::ERR_CONNECTION_REFUSED
GET http://localhost:8051/_stcore/allowed_message_origins net::ERR_CONNECTION_REFUSED

Steps to reproduce

The app itself just contains one title and nothing else

import streamlit as st
st.title("Test App")

The config file looks as follows

[server]
port=3000
enableXsrfProtection=false
enableCORS=false

I start it using streamlit run main.py. The python console shows that the app is served, but in the Browser the "please wait… " dialoge does not disappear and I get the aforementioned error messages in the console of the browser

Debug info

  • Streamlit version: 1.22.0
  • Python version: 3.11.3
  • OS version: Windows 10
  • Browser version: Edge version 113.0.1774.50

Requirements file

Just streamlit
streamlit==1.22.0

I’m running on the streamlit cloud and getting those same errors.