How can i iframe a mesop app in a https site #672
Answered
by
richard-to
JohnHardline
asked this question in
Q&A
-
Since Mesop runs a http server - i can not iframe a mesop app into a https site .... What is the solution to this problem ? |
Beta Was this translation helpful? Give feedback.
Answered by
richard-to
Jul 29, 2024
Replies: 1 comment 4 replies
-
In Mesop you need to explicitly allow a website to iframe a mesop app. This is described here: https://google.github.io/mesop/guides/web_security/#iframe-security Quick example copied from that page: @me.page(
path="/allows_iframed",
security_policy=me.SecurityPolicy(
allowed_iframe_parents=["https://google.com"],
),
)
def app():
me.text("Test CSP") |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes. I think this depends on your server architecture.
Here's a high level example of what you'd need:
That's the high level example of how you'd run Mesop on a custom server architecture. You can replace Nginx …