Merge pull request #186 from ONLYOFFICE/bugfix/csp-error

Fixed checking CSP settings
This commit is contained in:
Alexey Safronov 2024-01-18 18:46:01 +04:00 committed by GitHub
commit 59a2a5ca6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 112 additions and 28 deletions

View File

@ -0,0 +1,77 @@
<svg width="121" height="101" viewBox="0 0 121 101" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M42.2414 97.7453C43.8908 97.2341 44.1991 91.8801 42.3573 81.8676C41.053 82.4657 39.1401 81.8992 37.3431 80.1391C38.1231 86.0254 35.5093 91.7905 32.7031 97.4713C35.1114 99.2314 38.6 100.412 42.2414 97.7453Z" fill="#EF4B24"/>
<path opacity="0.3" d="M40.4558 81.9072C41.8602 83.0085 38.6456 98.4621 36.2795 97.1683C32.2034 96.0643 33.1335 98.5332 35.829 98.7282C39.747 99.2367 41.212 98.6544 42.6111 97.2026C43.673 93.3583 43.5123 88.7868 42.5453 82.1601L40.4558 81.9072Z" fill="#5F190F"/>
<path d="M37.4293 80.1364C37.3055 86.7895 35.8168 92.7074 32.7129 97.7611C34.9842 99.2682 39.8587 100.18 42.3934 97.74C43.9454 95.5899 43.89 88.4863 42.7228 81.8623" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M33.0351 98.2277C33.5531 97.3304 33.546 96.3565 33.0193 96.0523C32.4925 95.7482 31.6455 96.229 31.1275 97.1263C30.6094 98.0235 30.6165 98.9975 31.1433 99.3016C31.67 99.6057 32.517 99.1249 33.0351 98.2277Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M35.5896 98.7376C36.2126 97.7766 36.1128 96.6055 35.3668 96.1218C34.6207 95.6381 33.5108 96.025 32.8878 96.986C32.2648 97.947 32.3646 99.1181 33.1106 99.6018C33.8567 100.085 34.9666 99.6986 35.5896 98.7376Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M44.16 81.4059C44.6673 80.4281 43.2931 78.7091 41.0906 77.5666C38.8881 76.424 36.6914 76.2905 36.1841 77.2684C35.6769 78.2463 37.0511 79.9652 39.2536 81.1078C41.4561 82.2503 43.6528 82.3838 44.16 81.4059Z" fill="#90211D" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10"/>
<path d="M21.1524 81.292C22.1382 80.5867 22.5448 79.466 22.0604 78.7891C21.5761 78.1121 20.3842 78.1351 19.3984 78.8405C18.4125 79.5459 18.0059 80.6665 18.4903 81.3434C18.9747 82.0204 20.1665 81.9974 21.1524 81.292Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M32.9111 68.2858C35.1824 69.1316 34.8609 75.9902 31.541 81.0438C25.8602 89.6889 23.1963 80.3825 25.8075 77.0099C29.4884 72.2434 30.184 67.2714 32.9111 68.2858Z" fill="#EF4B24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M30.2586 81.7285C30.1611 84.0709 29.6184 84.4135 26.6251 85.5043C17.9617 87.852 18.5545 78.9804 25.2471 77.5654" fill="#EF4B24"/>
<path d="M30.2586 81.7285C30.1611 84.0709 29.6184 84.4135 26.6251 85.5043C17.9617 87.852 18.5545 78.9804 25.2471 77.5654" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21.4328 83.5105C22.3751 82.2637 22.6203 80.861 21.9807 80.3776C21.341 79.8942 20.0585 80.5131 19.1163 81.7599C18.174 83.0068 17.9287 84.4095 18.5684 84.8929C19.2081 85.3763 20.4905 84.7574 21.4328 83.5105Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M27.8209 85.3373C28.459 84.2321 28.4216 83.0159 27.7373 82.6208C27.053 82.2257 25.981 82.8014 25.3429 83.9066C24.7048 85.0118 24.7422 86.228 25.4265 86.6231C26.1108 87.0182 27.1828 86.4425 27.8209 85.3373Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M37.7638 69.2329C37.7863 66.3997 36.2851 64.0908 34.4108 64.0759C32.5365 64.061 30.9988 66.3457 30.9763 69.179C30.9538 72.0123 32.455 74.3212 34.3293 74.3361C36.2036 74.3509 37.7412 72.0662 37.7638 69.2329Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M61.7208 65.1604C61.2755 72.6145 55.6052 82.8035 45.4004 82.1922C35.3114 81.5889 31.1773 69.9822 31.4224 62.5203C31.8018 50.9585 38.8185 54.7053 47.0155 55.198C55.2153 55.6881 62.1661 57.7064 61.7208 65.1604Z" fill="#EF4B24"/>
<path opacity="0.3" d="M55.479 60.5841C56.778 61.8752 54.8808 74.9573 50.7731 77.7371C47.5717 80.7593 40.8923 79.8635 39.7988 79.6316C39.8884 81.1256 49.9563 84.016 54.8097 80.0716C59.5077 75.1945 62.161 68.5678 59.0835 59.8411L55.479 60.5841Z" fill="#5F190F"/>
<path d="M33.0985 54.5574C23.6261 84.782 61.7527 94.0515 61.4945 62.3645C61.4734 59.9114 59.0625 57.3055 56.5093 57.1527" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M54.2678 81.1004C56.3871 79.8325 57.5558 77.8865 56.8782 76.7538C56.2006 75.6211 53.9332 75.7306 51.8139 76.9985C49.6946 78.2663 48.5259 80.2123 49.2035 81.345C49.8811 82.4777 52.1485 82.3682 54.2678 81.1004Z" fill="#90211D" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10"/>
<path d="M51.9734 79.049C49.27 81.4521 53.8073 100.668 57.8149 99.4561C61.1744 98.9134 63.7987 97.841 64.9897 95.7357C65.0951 91.317 59.0507 86.6032 55.2907 79.302C54.69 77.5893 52.9351 78.0188 51.9734 79.049Z" fill="#EF4B24"/>
<path opacity="0.3" d="M54.8987 79.2148C54.7354 82.1553 68.1679 96.4574 56.6931 98.9368C58.5296 100.478 65.5067 97.2452 65.0509 94.966C65.3934 91.4248 57.9815 85.1538 55.4652 79.6284C55.0278 78.6694 54.8091 79.1858 54.8987 79.2148Z" fill="#5F190F"/>
<path d="M52.5209 78.5562C48.7899 80.6983 53.6644 97.688 56.7999 99.3637C59.9354 101.04 64.9891 95.7355 64.9891 95.7355C65.1946 91.3616 58.7471 85.5228 55.1241 78.8855" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M64.7257 98.6318C65.4219 98.4775 65.7898 97.4666 65.5475 96.3741C65.3053 95.2816 64.5445 94.5211 63.8484 94.6754C63.1522 94.8298 62.7843 95.8406 63.0266 96.9332C63.2688 98.0257 64.0296 98.7862 64.7257 98.6318Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M60.294 100.337C60.9059 99.971 60.9363 98.8957 60.3618 97.9353C59.7872 96.9749 58.8254 96.4932 58.2135 96.8592C57.6015 97.2253 57.5712 98.3006 58.1457 99.261C58.7202 100.221 59.6821 100.703 60.294 100.337Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M63.1826 99.6624C64.0393 99.1499 64.1391 97.7402 63.4054 96.5139C62.6718 95.2875 61.3825 94.7088 60.5258 95.2213C59.6691 95.7338 59.5694 97.1435 60.303 98.3698C61.0367 99.5962 62.3259 100.175 63.1826 99.6624Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M61.4348 63.5509C61.8765 60.0849 60.0321 56.9945 57.3153 56.6484C54.5986 56.3022 52.0382 58.8313 51.5965 62.2973C51.1549 65.7633 52.9993 68.8536 55.716 69.1998C58.4328 69.546 60.9932 67.0169 61.4348 63.5509Z" fill="#90211D" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10"/>
<path d="M55.2436 60.623C52.3794 63.7848 54.6244 70.2956 60.4711 71.945C70.4731 74.767 71.6404 62.7651 67.2033 62.0643C60.9375 61.0788 58.6821 56.8314 55.2436 60.623Z" fill="#EF4B24" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10"/>
<path d="M68.6066 63.2213C71.5788 66.6572 68.0481 74.0849 60.9023 76.1901C48.6791 79.7946 46.5633 65.0051 54.1412 64.8259C61.6427 64.6468 65.039 59.1004 68.6066 63.2213Z" fill="#EF4B24"/>
<path d="M68.7551 63.1974C71.7272 66.6332 68.1965 74.061 61.0507 76.1662C48.8275 79.7707 46.7117 64.9812 54.2896 64.802C61.7911 64.6228 65.1875 59.0764 68.7551 63.1974Z" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10"/>
<path opacity="0.3" d="M54.2383 75.8815C61.06 76.4454 70.78 68.6646 68.9593 63.2737C70.3242 65.7821 69.7867 68.6014 67.3099 71.7448C63.9557 75.2861 61.2286 77.6048 54.2383 75.8815Z" fill="#5F190F"/>
<path d="M0.763444 35.4074C0.42618 37.6708 6.50484 41.8839 11.108 44.8613L13.2923 30.5197C7.81173 30.8412 1.10334 33.1256 0.763444 35.4074Z" fill="#AA3C24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M17.2407 23.669L27.0082 15.1531C22.5605 12.5815 19.4303 10.4235 16.6742 11.5091C13.9523 12.7975 14.8324 17.8591 17.2407 23.669Z" fill="#AA3C24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M39.7497 2.71118C37.2966 2.93778 34.169 9.05332 33.1309 14.8158L47.5067 14.7473C45.4858 9.33525 42.7534 2.60315 39.7497 2.71118Z" fill="#AA3C24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M50.6113 15.928L60.2602 28.0247C63.6882 21.8406 67.6115 12.4816 64.4286 9.0536C60.8162 8.16301 55.7994 11.7702 50.6113 15.928Z" fill="#AA3C24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M59.6694 35.1308L58.7656 50.5817C63.8746 49.7912 69.7109 47.7703 69.898 44.1104C69.2551 39.9447 64.5492 37.2888 59.6694 35.1308Z" fill="#AA3C24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M15.0556 54.8871L25.3527 64.4465C21.0763 67.3501 15.4561 69.8822 12.7765 67.4924C10.9057 65.9062 12.9609 59.7933 15.0556 54.8871Z" fill="#AA3C24" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M52.0845 2.14195C47.8055 4.29991 44.3986 7.994 41.8586 13.2242C41.8928 13.269 41.798 13.6142 41.8349 13.659C40.5675 13.4271 39.5583 13.4245 38.2251 13.406C32.5548 4.64508 26.9294 0.318619 24.5343 1.66767C21.5463 4.05487 21.4936 11.0584 21.9547 18.9972C21.9547 18.9972 19.5148 21.2 18.1658 22.715C7.85025 21.9931 3.65553 21.8956 2.89669 24.0088C2.15365 26.0798 6.48802 32.9515 11.6049 37.7944C11.4811 38.5928 10.8883 39.8812 10.8303 40.6849C5.80822 42.1288 1.99556 43.0088 0.8125 46.8715C1.43697 51.0768 8.24285 55.2741 14.5165 57.5533C17.8074 61.2764 19.1512 63.134 23.2432 65.2366C40.5042 74.1056 57.0697 60.7784 60.9561 51.1058C60.9561 51.1058 62.0127 44.8875 62.4554 42.6399L62.5661 39.5097C67.9728 33.8368 71.9172 24.4988 70.3995 22.2697C66.8056 19.7007 63.1694 22.3778 58.7718 22.9258C58.7718 22.9258 57.6731 22.7572 55.7839 21.113C57.0038 14.4626 55.4334 1.98913 52.0845 2.14195Z" fill="#EF4B24"/>
<path opacity="0.3" d="M54.8445 59.569C64.9387 52.3073 64.5303 30.4826 56.5308 21.2737C56.104 13.5009 55.4927 3.5595 52.6654 2.39489C51.1109 3.02989 49.6037 4.73729 41.8335 13.6616C41.8335 13.6616 40.2341 14.0832 38.2026 13.3401C34.5164 7.33791 28.8515 0.0419484 27.2969 1.1038C30.3138 5.74118 34.5955 12.3046 32.0581 17.8379C50.157 20.0406 57.8245 47.936 54.8445 59.569Z" fill="#5F190F"/>
<path opacity="0.3" d="M3.97266 22.8971C8.25433 21.0158 12.3779 21.5428 18.1957 23.1553C18.1061 25.7876 17.176 28.7281 15.3659 31.9953C14.5517 28.5041 9.65608 23.9695 3.97266 22.8971Z" fill="#5F190F"/>
<path opacity="0.3" d="M1.66797 49.3669C6.10246 51.2482 10.3367 48.9295 10.8874 45.5437C11.0402 48.4948 12.4657 54.9634 14.5209 57.5482C10.0759 56.4652 5.04851 53.0294 1.66797 49.3669Z" fill="#5F190F"/>
<path opacity="0.3" d="M60.4922 26.9894C62.4499 24.1438 70.3703 20.8423 70.2096 23.572C70.4388 26.7576 67.522 33.4949 63.0507 38.8911L60.4922 26.9894Z" fill="#5F190F"/>
<path d="M14.5194 57.5511C-3.32665 50.0734 -2.87345 43.5758 10.8305 40.6853" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M57.7188 23.2792C74.1208 16.8211 73.607 25.5399 62.5669 39.5047" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M38.1613 68.1429C26.1094 68.77 10.6058 63.2499 10.8324 40.6823L11.196 38.4532C0.730257 25.0153 -2.34201 19.519 18.1679 22.7151L22.3758 18.5862C21.1426 -1.8393 25.6746 -5.39638 37.9663 13.7644L41.6472 13.601C51.1907 -3.01973 56.4473 -2.4137 56.3208 21.6453C64.3177 29.9425 65.9197 52.3468 53.5858 60.5413" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M13.5762 34.5459C16.3929 31.1206 18.4718 25.5557 18.1661 22.7153" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M28.3984 18.6861C33.6129 18.0116 36.6878 16.1514 37.9657 13.7642" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M46.2051 19.6458C50.1073 23.382 54.3126 23.0526 56.3994 21.3268" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M43.3479 49.0033C48.1093 49.0033 51.9692 45.1435 51.9692 40.382C51.9692 35.6206 48.1093 31.7607 43.3479 31.7607C38.5865 31.7607 34.7266 35.6206 34.7266 40.382C34.7266 45.1435 38.5865 49.0033 43.3479 49.0033Z" fill="#751A06"/>
<path d="M43.3479 49.0033C48.1093 49.0033 51.9692 45.1435 51.9692 40.382C51.9692 35.6206 48.1093 31.7607 43.3479 31.7607C38.5865 31.7607 34.7266 35.6206 34.7266 40.382C34.7266 45.1435 38.5865 49.0033 43.3479 49.0033Z" stroke="#451004" stroke-width="1.05395" stroke-miterlimit="10"/>
<path opacity="0.3" d="M43.648 48.3448C47.7832 48.2737 51.0817 45.0867 51.0153 41.2264C50.9489 37.3661 47.5428 34.2945 43.4075 34.3656C39.2722 34.4367 35.9738 37.6237 36.0402 41.484C36.1066 45.3443 39.5127 48.416 43.648 48.3448Z" fill="#5F190F"/>
<path d="M47.773 40.029C48.922 39.6613 49.4316 38.0454 48.9113 36.4197C48.391 34.794 47.0379 33.7741 45.8889 34.1418C44.74 34.5095 44.2304 36.1255 44.7506 37.7512C45.2709 39.3769 46.6241 40.3967 47.773 40.029Z" fill="white"/>
<path d="M48.8235 43.8739C49.0963 42.8744 48.6403 41.8793 47.805 41.6513C46.9697 41.4234 46.0715 42.0488 45.7986 43.0484C45.5258 44.0479 45.9818 45.043 46.8171 45.2709C47.6524 45.4989 48.5507 44.8735 48.8235 43.8739Z" fill="white"/>
<path d="M23.8644 59.6113C27.2642 57.9379 28.3288 53.1447 26.2422 48.9054C24.1556 44.6661 19.708 42.586 16.3082 44.2594C12.9084 45.9328 11.8438 50.7259 13.9304 54.9652C16.017 59.2045 20.4646 61.2846 23.8644 59.6113Z" fill="#751A06"/>
<path d="M23.798 59.6694C27.1978 57.996 28.2624 53.2028 26.1758 48.9635C24.0892 44.7242 19.6416 42.6441 16.2418 44.3175C12.842 45.9909 11.7774 50.784 13.864 55.0233C15.9506 59.2626 20.3982 61.3427 23.798 59.6694Z" stroke="#451004" stroke-width="1.05395" stroke-miterlimit="10"/>
<path opacity="0.3" d="M23.9649 58.8481C26.8223 57.2286 27.6054 53.2103 25.7139 49.8731C23.8224 46.5358 19.9726 45.1434 17.1152 46.7629C14.2578 48.3824 13.4748 52.4007 15.3662 55.7379C17.2577 59.0752 21.1075 60.4676 23.9649 58.8481Z" fill="#5F190F"/>
<path d="M23.2987 50.713C24.1189 50.2077 24.0661 48.633 23.1807 47.1958C22.2953 45.7587 20.9127 45.0032 20.0925 45.5085C19.2723 46.0137 19.3252 47.5884 20.2105 49.0256C21.0959 50.4628 22.4785 51.2183 23.2987 50.713Z" fill="white"/>
<path d="M24.6484 55.7195C25.322 55.5293 25.6454 54.5861 25.3706 53.6128C25.0958 52.6394 24.3269 52.0045 23.6533 52.1947C22.9797 52.3849 22.6564 53.3281 22.9311 54.3014C23.2059 55.2748 23.9748 55.9097 24.6484 55.7195Z" fill="white"/>
<path d="M39.3966 27.5713C40.4216 28.375 39.4783 29.8294 37.7209 32.0691C35.9634 34.3087 35.5919 37.4547 33.0308 35.6788C30.4776 33.9056 31.8056 30.8623 34.0189 29.0732C36.6827 26.9258 38.3743 26.7677 39.3966 27.5713Z" fill="#751A06" stroke="#451004" stroke-width="1.05395" stroke-miterlimit="10"/>
<path d="M21.0709 40.5559C20.6072 42.7454 19.3714 42.4846 16.7181 41.8127C14.323 41.2067 12.2283 40.9484 12.2072 39.7891C12.1861 38.6298 14.1754 37.6549 16.647 37.6101C19.1185 37.5653 21.5215 38.419 21.0709 40.5559Z" fill="#751A06" stroke="#451004" stroke-width="1.05395" stroke-miterlimit="10"/>
<path d="M35.3691 64.0299C35.4956 65.5476 35.8698 65.7689 36.2782 66.0666C37.0423 66.62 37.8169 66.2722 38.2675 65.4738C38.805 64.5173 38.8762 62.918 37.896 61.4556C39.6087 64.1906 43.5531 64.5358 43.3396 61.9589C43.2975 61.4424 42.8285 60.2805 41.6586 59.9089" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M33.2872 62.8656C37.548 62.8656 41.0021 59.4115 41.0021 55.1507C41.0021 50.8899 37.548 47.4358 33.2872 47.4358C29.0263 47.4358 25.5723 50.8899 25.5723 55.1507C25.5723 59.4115 29.0263 62.8656 33.2872 62.8656Z" fill="#90211D"/>
<path d="M33.3516 62.8392C37.6125 62.8392 41.0665 59.3852 41.0665 55.1243C41.0665 50.8635 37.6125 47.4094 33.3516 47.4094C29.0908 47.4094 25.6367 50.8635 25.6367 55.1243C25.6367 59.3852 29.0908 62.8392 33.3516 62.8392Z" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10"/>
<path opacity="0.3" d="M33.5575 62.2739C37.2577 62.2102 40.2091 59.3595 40.1498 55.9067C40.0904 52.4538 37.0426 49.7064 33.3424 49.77C29.6422 49.8337 26.6907 52.6843 26.7501 56.1372C26.8095 59.59 29.8573 62.3375 33.5575 62.2739Z" fill="#5F190F"/>
<path d="M38.1234 54.5752C39.0466 54.0208 39.1184 52.4448 38.2839 51.055C37.4494 49.6652 36.0244 48.988 35.1013 49.5424C34.1781 50.0967 34.1062 51.6728 34.9408 53.0625C35.7753 54.4523 37.2002 55.1295 38.1234 54.5752Z" fill="white"/>
<path d="M54.2376 75.8819C51.7292 76.2034 48.0456 72.2221 48.7834 68.441C49.3156 54.7555 62.7825 59.6089 61.7549 70.0009" fill="#EF4B24"/>
<path d="M54.2376 75.8819C51.7292 76.2034 48.0456 72.2221 48.7834 68.441C49.3156 54.7555 62.7825 59.6089 61.7549 70.0009" stroke="#5F190F" stroke-width="1.05395" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M57.1505 63.9867C57.2149 62.6553 55.5386 61.4924 53.4064 61.3893C51.2742 61.2862 49.4935 62.2819 49.4291 63.6133C49.3647 64.9446 51.041 66.1075 53.1732 66.2106C55.3054 66.3137 57.0861 65.318 57.1505 63.9867Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M55.0357 70.5819C55.4762 69.5992 54.5825 68.2419 53.0395 67.5501C51.4966 66.8583 49.8886 67.0941 49.4481 68.0768C49.0075 69.0594 49.9012 70.4167 51.4442 71.1085C52.9872 71.8003 54.5952 71.5645 55.0357 70.5819Z" fill="#90211D" stroke="#5F190F" stroke-width="0.790462" stroke-miterlimit="10"/>
<path d="M74.337 100.439C92.6362 95.2111 105.489 85.3014 111.921 69.8795L120.247 32.7594C102.47 25.163 82.8108 21.0764 61.7344 19.6324L53.4082 56.7525C53.9905 73.9846 61.4498 88.3446 74.337 100.439Z" fill="#89AFAF"/>
<path d="M57.7355 76.7143L116.578 47.1827L119.671 33.3944L54.7344 65.2289C55.1691 69.01 56.115 72.8332 57.7355 76.7143Z" fill="#B0D1CF"/>
<path d="M61.028 82.6824L114.065 58.3862L115.839 50.4843L58.791 78.2453C59.513 81.0356 60.0452 81.1805 61.028 82.6824Z" fill="#B0D1CF"/>
<path d="M74.337 100.439C92.6362 95.2111 105.489 85.3014 111.921 69.8795L120.247 32.7594C102.47 25.163 82.8108 21.0764 61.7344 19.6324L53.4082 56.7525C53.9905 73.9846 61.4498 88.3446 74.337 100.439Z" stroke="#678282" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M75.9414 93.2878C91.2817 88.906 102.053 80.5982 107.447 67.6715L114.426 36.5563C99.5236 30.1905 83.0451 26.7651 65.3782 25.5531L58.3984 56.6683C58.8859 71.1127 65.1384 83.1514 75.9414 93.2878Z" stroke="#678282" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M76.631 40.6801C80.8962 40.6801 84.3538 37.2225 84.3538 32.9573C84.3538 28.6921 80.8962 25.2345 76.631 25.2345C72.3658 25.2345 68.9082 28.6921 68.9082 32.9573C68.9082 37.2225 72.3658 40.6801 76.631 40.6801Z" fill="#A1C9C7" stroke="#678282" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M66.9555 45.0673C68.7323 45.0673 70.1726 43.6269 70.1726 41.8501C70.1726 40.0733 68.7323 38.6329 66.9555 38.6329C65.1787 38.6329 63.7383 40.0733 63.7383 41.8501C63.7383 43.6269 65.1787 45.0673 66.9555 45.0673Z" fill="#A1C9C7" stroke="#678282" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M89.3637 36.6725C91.1405 36.6725 92.5809 35.2321 92.5809 33.4553C92.5809 31.6785 91.1405 30.2382 89.3637 30.2382C87.5869 30.2382 86.1465 31.6785 86.1465 33.4553C86.1465 35.2321 87.5869 36.6725 89.3637 36.6725Z" fill="#A1C9C7" stroke="#678282" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M76.6303 37.5447C79.1638 37.5447 81.2176 35.4909 81.2176 32.9574C81.2176 30.4239 79.1638 28.3701 76.6303 28.3701C74.0968 28.3701 72.043 30.4239 72.043 32.9574C72.043 35.4909 74.0968 37.5447 76.6303 37.5447Z" fill="#FFF800" stroke="#678282" stroke-width="0.790462" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -55,24 +55,22 @@
},
};
const checkCSP = (targetSrc, onAppError) => {
const cspErrorText =
"The current domain is not set in the Content Security Policy (CSP) settings.";
const validateCSP = async (targetSrc) => {
const currentSrc = window.location.origin;
if (currentSrc.indexOf(targetSrc) !== -1) return true;
if (currentSrc.indexOf(targetSrc) !== -1) return; //TODO: try work with localhost
const cspSettings = async () => {
try {
const settings = await fetch(`${targetSrc}/api/2.0/security/csp`);
const res = await settings.json();
const { header } = res.response;
const response = await fetch(`${targetSrc}/api/2.0/security/csp`);
const res = await response.json();
const passed =
res.response.header && res.response.header.includes(currentSrc);
return header && header.indexOf(currentSrc) !== -1;
} catch (e) {
onAppError(e);
}
};
if (!passed) throw new Error(cspErrorText);
return cspSettings();
return;
};
const getConfigFromParams = () => {
@ -105,7 +103,6 @@
class DocSpace {
#iframe;
#isConnected = false;
#cspInstalled = true;
#callbacks = [];
#tasks = [];
#classNames = "";
@ -220,13 +217,30 @@
document.body.style.overscrollBehaviorY = "contain";
}
if (!this.#cspInstalled) {
const errorMessage =
"Current domain not set in Content Security Policy (CSP) settings. Please add it on developer tools page.";
config.events.onAppError(errorMessage);
const html = `<body>${errorMessage}</body>`;
if (this.config.checkCSP) {
validateCSP(this.config.src).catch((e) => {
const html = `
<body style="background: #F3F4F4;">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css">
<div style="display: flex; flex-direction: column; gap: 80px; align-items: center; justify-content: flex-start; margin-top: 60px; padding: 0 30px;">
<div style="flex-shrink: 0; width: 211px; height: 24px; position: relative">
<img src="${this.config.src}/static/images/logo/lightsmall.svg">
</div>
<div style="display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: flex-start; flex-shrink: 0; position: relative;">
<div style="flex-shrink: 0; width: 120px; height: 100px; position: relative">
<img src="${this.config.src}/static/images/frame-error.svg">
</div>
<span style="color: #A3A9AE; text-align: center; font-family: Open Sans; font-size: 14px; font-style: normal; font-weight: 700; line-height: 16px;">
${cspErrorText} Please add it via
<a href="${this.config.src}/portal-settings/developer-tools/javascript-sdk" target="_blank" style="color: #4781D1; text-align: center; font-family: Open Sans; font-size: 14px; font-style: normal; font-weight: 700; line-height: 16px; text-decoration-line: underline;">
the Developer Tools section</a>.
</span>
</div>
</div>
</body>`;
iframe.srcdoc = html;
e.message && config.events.onAppError(e.message);
});
}
return iframe;
@ -322,13 +336,6 @@
const target = document.getElementById(this.config.frameId);
if (this.config.checkCSP) {
this.#cspInstalled = checkCSP(
this.config.src,
this.config.events.onAppError
);
}
if (target) {
this.#iframe = this.#createIframe(this.config);
this.#classNames = target.className;