()
| 41 | } |
| 42 | |
| 43 | override render() { |
| 44 | const { env, version, envVars, locale } = this.props; |
| 45 | return ( |
| 46 | <Html> |
| 47 | <Head> |
| 48 | <link rel="apple-touch-icon" href={integrateCdnHost(JSON.parse(envVars).LOGO)} /> |
| 49 | <link rel="shortcut icon" href={integrateCdnHost(JSON.parse(envVars).FAVICON)} /> |
| 50 | <meta property="og:image" content={integrateCdnHost(JSON.parse(envVars).FAVICON)} /> |
| 51 | {/* Do not send referrer in development mode to solve the problem of CDN Anti-Leech chain images not displaying. */} |
| 52 | {process.env.NODE_ENV === 'development' && <meta name="referrer" content="no-referrer" />} |
| 53 | <link rel="manifest" href={'/file/manifest.json'} /> |
| 54 | {JSON.parse(envVars).EMBED_BAIDU_CATCH_SDK && ( |
| 55 | <script src="https://rte-fe-static.bj.bcebos.com/rte-online/rte-fe-static/MultiSheetMonitor/index.js" /> |
| 56 | )} |
| 57 | <script src="/file/js/browser_check.2.js" async /> |
| 58 | {/* injection of custom configs of editions, e.g. APITable */} |
| 59 | <script src={`/custom/custom_config.js?version=${version}`} defer /> |
| 60 | {JSON.parse(envVars).COOKIEBOT_ID && ( |
| 61 | <script |
| 62 | id="Cookiebot" |
| 63 | src="https://consent.cookiebot.com/uc.js" |
| 64 | data-cbid={JSON.parse(envVars).COOKIEBOT_ID} |
| 65 | data-blockingmode="auto" |
| 66 | async |
| 67 | /> |
| 68 | )} |
| 69 | </Head> |
| 70 | <body> |
| 71 | <Main /> |
| 72 | <NextScript /> |
| 73 | {!JSON.parse(envVars).IS_SELFHOST && <Script src="https://g.alicdn.com/AWSC/AWSC/awsc.js" strategy={'beforeInteractive'} />} |
| 74 | { |
| 75 | <Script id="__initialization_data__" strategy={'beforeInteractive'}> |
| 76 | {` |
| 77 | window.__initialization_data__ = { |
| 78 | env: '${process.env.NODE_ENV === 'development' ? 'development' : env}', |
| 79 | version: '${version}', |
| 80 | envVars: ${envVars}, |
| 81 | locale:'${locale}', |
| 82 | userInfo: null, |
| 83 | wizards: null, |
| 84 | }; |
| 85 | `} |
| 86 | </Script> |
| 87 | } |
| 88 | </body> |
| 89 | </Html> |
| 90 | ); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | export default MyDocument; |
no test coverage detected