Streaming chunk of text python/flask in IIS

Hi all,
My app successfully streams answers from my assistant to the browser when I run the flask app directly using py app.py. I’m using iiS to deploy to my intranet an while its all working, it no longer streams the chunks, it just shows the completed answer at the end. I can see the chunks in the event stream in console and the content type is text/event-stream for them. so I’m puzzled to say the least! Our intranet delivered using iis so

My web.config file is below, but, I’ve tried tweaking it various ways without any luck, turned off any caching I can find in iis as well. Any suggestions very much appreciated, as without streaming the chat feels VERY slow to respond.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="PYTHONPATH" value="C:\python\fusion" />
    <add key="WSGI_HANDLER" value="app.app" />
    <add key="WSGI_LOG" value="C:\python\fusion\wfastcgi.log" />
  </appSettings>

  <system.webServer>
    <handlers>
      <add name="Flask" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Users\somewhere\AppData\Local\Programs\Python\Python311\python.exe|C:\Users\somewhere\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
    </handlers>
     <httpProtocol>
      <customHeaders>
        <add name="Cache-Control" value="no-cache" />
	<add name="X-Accel-Buffering" value="no" />
      </customHeaders>
    </httpProtocol>
    <staticContent>
      <clientCache cacheControlMode="DisableCache" />
	<remove fileExtension=".pdf" />
            <mimeMap fileExtension=".pdf" mimeType="application/pdf" />
    </staticContent>
        <caching enabled="false" enableKernelCache="false" />

               
  </system.webServer>
</configuration>