0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

fix(console): add sandbox attribute to iframe (#1926)

This commit is contained in:
wangsijie 2022-09-15 12:20:14 +08:00 committed by GitHub
parent 8d22b5c468
commit 14cb0439e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,3 @@
// FIXME: @sijie
/* eslint-disable react/iframe-missing-sandbox */
import { languageOptions } from '@logto/phrases-ui';
import {
AppearanceMode,
@ -197,7 +195,12 @@ const Preview = ({ signInExperience, className }: Props) => {
<PhoneInfo />
</div>
)}
{
// The missing of attribute "sandbox" is intended since the source is trusted
/* eslint-disable react/iframe-missing-sandbox */
}
<iframe ref={previewRef} src="/sign-in?preview=true" tabIndex={-1} />
{/* eslint-enable react/iframe-missing-sandbox */}
</div>
</div>
</div>
@ -206,4 +209,3 @@ const Preview = ({ signInExperience, className }: Props) => {
};
export default Preview;
/* eslint-enable react/iframe-missing-sandbox */