I'd like to embed an iframe on my site that is hosted locally but I can't because the referrer policy is set to 'strict-origin-when-cross-origin'.
The src for the iframe is from a website that is made for the purpose of embedding into an iframe so there is no restrictions in the response headers from the src. I also know this because if I put the link for the src directly into my iframe like so :
<iframe id="panoramic" style="border: 4px solid white" frameBorder="0" v-bind:src="https://momento360.com/e/u/47de8a9ca774487aa1f2bffb9c9fcc94?utm_campaign=embed&utm_source=other&heading=0&pitch=0&field-of-view=75&size=medium"></iframe>
it works with no issues. The problem is the iframe src is reactive (using Vue) so when it tries to update to the new src my browser is blocking it because of the referrer policy on my site. I've tested this with browsers that default to 'no-referrer' and it will load, but unfortunately chrome defaults to a strict referrer policy.
I'm using Flask to handle the routing so I figured there was a way to easily change this but from what I've found there isn't. I've found Flask-Talisman but the default settings on this extension are extremely strict and ideally I'd like a lighter-weight way of changing this policy.
This is the route handling for the page I'd like to have the no-referrer policy:
@app.route('/scene_build')
def sceneBuilder():
resp = Response(render_template('scene_build.html', profile = session['userData']))
resp.headers["Referrer-Policy"] = 'no-referrer'
return resp