kd-research / GameAutoMakeServer

A server aims to automatically generate unity games from requests
0 stars 0 forks source link

ActiveStorage migrate from local disk services to google storage #7

Open hukaidong opened 2 months ago

hukaidong commented 2 months ago

Following problems need to be investigated:

hukaidong commented 2 months ago

Following code are useful setting google cors bucket

bucket.cors do |c|
  c.clear
  c.add_rule ["*"],
             %w[GET PUT POST OPTIONS],
             headers: [
               "Content-Type",
               "x-goog-resumable",
               { "Content-Encoding" => "gzip" },
               { "Access-Control-Allow-Credentials" => "true" },
               { "Access-Control-Allow-Headers" => "Accept, X-Access-Token, X-Application-Name, X-Request-Sent-Time" },
               { "Access-Control-Allow-Methods" => "GET, POST, OPTIONS" },
               { "Access-Control-Allow-Origin" => "*" }
             ],
             max_age: 3600
end