Hi @pawlean,
Yes, I figured out the issue. I was opening the domain inside the iframe as domainB.com and not www.domainB.com.
domainB.com was probably redirecting to www inside the iframe because i was getting a 308 Permanent Redirect. The headers were missing during/after this redirect. I was able to resolve the issue by explicitly including www in the iframe url.