"Domain Name" is not defined in the mta-sts worker

I can’t seem to get my mta-sts page working with cloudflare workers. I am using code from this gtihub source in the worker (I can’t seem to post my full code because it doesn’t allow me ‘more than 4 links’ on this post for some reason)

I’ve also added the correct DNS for Workspace:

_smtp._tls with content: v=TLSRPTv1;rua=mailto:smtp-tls-reports@…
_mta-sts with content: v=STSv1;id=1711021083411;

The Worker also created its own DNS for the page of the worker.
Type: Worker, Name: mta-sts.siteelevatedsolutions.com, Target: mta-sts-siteelevatedsolutions-tld, Proxy status: Proxied, TTL: Auto

I am pretty new to this process and I can’t seem to get the page working with this ““Domain Name” is not defined in the mta-sts worker” error coming back when I access the page at https://mta-sts.siteelevatedsolutions.com/.well-known/mta-sts.txt. I think that everything else is setup properly but for some reason the script isn’t getting the address correctly but like I said I am new to this and am not understanding it fully. Any help is appreciated, thanks in advance.

It doesn’t have to be that fancy. Just a basic Worker to return text is enough:

async function handleRequest(request) {
  const init = {
    headers: {
      'content-type': 'text/plain;charset=UTF-8',
    },
  }
  return new Response(someHTML, init)
}
addEventListener('fetch', event => {
  return event.respondWith(handleRequest(event.request))
})
const someHTML = `version: STSv1
mode: enforce
mx: smpt1.example.com
mx: smtp2.example.com
max_age: 86400
`

So all I need to do is change my worker code to look like this:

async function handleRequest(request) {
const init = {
headers: {
‘content-type’: ‘text/plain;charset=UTF-8’,
},
}
return new Response(someHTML, init)
}
addEventListener(‘fetch’, event => {
return event.respondWith(handleRequest(event.request))
})
const someHTML = version: STSv1 mode: enforced mx: aspmx.l.google.com mx: alt3.aspmx.l.google.com mx: alt4.aspmx.l.google.com mx: alt1.aspmx.l.google.com mx: alt2.aspmx.l.google.com max_age: 604800

How is it going to know the web address to access or anything like that and do I need to make any changes in DNS?