Closed vzblyfcode closed 1 week ago
Hi @vzblyfcode, thanks for your report. The error message "Refused to display 'https://digitalcollections.nypl.org/' in a frame because it set 'X-Frame-Options' to 'sameorigin'" indicates that the website you're trying to display in an iframe on your WebView is configured to prevent it from being embedded in an iframe from a different origin. The 'sameorigin' value for the X-Frame-Options header means that the page can only be displayed in a frame if the request originated from the same origin as the page itself.
@paulperez-dev Thank you. How do I fix this?
It is a security measure from the developer of the website. You can see the message on the developer console of the browser.
@paulperez-dev
Thanks. I understand that part. What I'm referring to is how to fix it in the Flutter Flow UI, as my class above allowed me to render it in an Android App locally, and so shouldn't I be able to render it in Flutter flow as well?
It may be because it tries to render the web natively on the web but the device is using the package.
Closing this issue since we haven't heard back from you. If you are still facing the problem please submit a new issue. Have a great day!
Has your issue been reported?
Current Behavior
I want my flutter Webview to open my website: https://digitalcollections.nypl.org/items/786175a0-942e-0132-97b0-58d385a7bbd0/book#page/1/mode/2up
Expected Behavior
Expected it to load similarly to https://flutter.dev
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT4klc/qw5dIseFG1pP1bcFFvDgWJlB8TL0/utV+ay8YGIytBu0cY8n7XFpBTbSraVNcHFmKhj4B7tHFiITTLfoFHzabGd061s1fWxbee2igWpuVCbmedmhQDdFhC0yA16u3gB4lPtttWHwC3Gauf9+WTirDFOu/Zwh9f6PHaOI=
Context
Trying to achieve with Flutter, what I already wrote code for. Can't even use my custom code, or don't know how to translate this to flutter syntax.
// GreenBookExperienceActivity.kt package com.example.experiences.ui.activities
import com.example.experiences.base.BaseActivity import android.os.Bundle import android.webkit.WebView import androidx.webkit.WebViewClientCompat import androidx.activity.OnBackPressedCallback import android.net.http.SslError import android.webkit.SslErrorHandler import android.util.Log
class GreenBookExperienceActivity : BaseActivity() {
}
Visual documentation
Additional Info
No response
Environment
General
Relative to the time the changes were made, data was lost within
When following my steps to reproduce, data loss happens