From a070891e7ee8b59b06625eca67dfaacd5389c37a Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 13 Jul 2023 10:01:30 +0200 Subject: [PATCH] Set bucket cors on creation of new installation --- csharp/App/Backend/S3/S3Cmd.cs | 13 ++++++++++++- csharp/App/Backend/db.sqlite | Bin 122880 -> 122880 bytes 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/csharp/App/Backend/S3/S3Cmd.cs b/csharp/App/Backend/S3/S3Cmd.cs index f3fd9160a..0851e5534 100644 --- a/csharp/App/Backend/S3/S3Cmd.cs +++ b/csharp/App/Backend/S3/S3Cmd.cs @@ -46,8 +46,19 @@ public class S3Cmd public async Task CreateBucket(String bucketName) { + var cors = @" + + + * + GET + HEAD + * + + "; var result = await Run(bucketName, "mb"); - return result.ExitCode == 0; + var setCors = await Run(bucketName, "PutBucketCors", cors); + + return result.ExitCode == 0 && setCors.ExitCode == 0; } public async Task DeleteBucket(String bucketName) diff --git a/csharp/App/Backend/db.sqlite b/csharp/App/Backend/db.sqlite index 2fcbf7c64e053a60a0087c98b34bfc9736f54d73..9a363a376558e36a632523bcdff07de64a7ffe59 100644 GIT binary patch delta 956 zcma))&ube;6vuaB*=xm;Y|$1ILLJAh4+aa*&g{<|no8DBTPsUmBw5bEogK|uiX5%A zS*?CRs~D3)pwO5=bIGBnUV3Q}RHdg}`wtXK4!wjNTIjKdQfRlKt$k}B@4@iin=fBJ zya&(u2haJ(*P}Ze$1VBwPb{5pV6gMm`>9R9k3ZkM^IkY|&P|10a^Y_xpN3wJqYK}M z-aIW$MQ^;dIy)O)y|zWU)o^f&K2b;OqtyN`6YCUVkwI01qJ;gYNhHeZ9&Ht!CTgqc znwjn3d?A%H3IbD4GSz{3v}+ssUe4M>aZAt*a@@Q}`Vd0w3qn(rpm<`h9W`62r4zACr+^Ndx^W~q7OfV$P#RVX#q4hGZ^K2$ zc5QcX!hF{fL!wDh9cmg=Oojv~F)B-vo;$gh?R57u)`602yla|8I80RYl93?;FWV~( zTBK@a>dJj(yEX4}(>G7=T#4Si#QKKMI@flYb4*%KZjV;}VlE?1L|CokdL2WGiDn`s zAxl!q+EFe}5{PXd*vFaDLCZwS{l0)R3Ap^}IWAJb=emm%ZTN}$O2Ch0j znH@G*S@wuS8^pQj8jL#3{dcf_w!-s^Yir;mejJ)>fz6A}|Mh?T1Ahwy=B|Jb#*4w9 PL4f0cH<|eY{3iYhKo}m? delta 508 zcmZoTz}|3xeS);0D+2?A91z2R)I=R)M%RrAuKJ8@o0sWFJMi+WGcfZpFz_+(P2?}x zEGY1aSE!MXkzZa^nS+B@S<*R~L6?_v@|jwlR6|3^k8v6Q1 zr2BarR(XW^_?!4w)9lnD!=wU^+s)P1TdYEKS;5Mu@5*OXn0_*z(TRB?|Lx6!2F?7cD$Kr& zgp6U^zAc~8UVxEp`?q?=SNv>XGugI3>t~b}-~~FKoBb98-#flJd;t@Sw6