صورة رمزية مفقودة للنظام بعد الترحيل إلى s3

منذ بضعة أسابيع قمنا بالانتقال من التخزين المحلي إلى S3. تم نقل المنشورات وصور رموز المستخدمين بنجاح، باستثناء صورة الرمز المخصصة للنظام.

يبدو أن إعادة كتابة الروابط فشلت، حيث يتم إرفاق S3_CDN_URL بعد رابط المنتدى.

لم أتحقق من أي شيء في قاعدة البيانات حتى الآن، ولكن يبدو أن “https:{S3_URL}” هو الرابط النسبي العالمي لصورة الرمز؟

https://forum.tosdr.org/https://tosdr-forum.s3.eu-west-2.jbcdn.net/original/1X/3662711e5030823983d25ac319ce6b9a7ad030e6.png

لاحظ أن هذا حدث فقط مع صورة الرمز الخاصة بالنظام، فالملف موجود على S3 أيضًا، والمشكلة فقط في الرابط النسبي.

تغيير صور الرموز لا يعمل أيضًا. يؤدي Gravatar إلى نفس المشكلة، وكذلك صور الأحرف.

هل هناك أي حل لهذه المشكلة؟ ملاحظة: لقد قمنا بالفعل بإعادة تثبيت المنتدى من نسخة احتياطية أقدم وقمنا بنقل الموقع مرة أخرى.

تحققت من قاعدة البيانات وجميع الرفع كانت سليمة تمامًا. (كان رفع الصورة الرمزية المعني صالحًا)

هل يمكن أن يكون هذا السطر هو السبب؟

مع ذلك، فإن s3_cdn_url موجود، ولا أستطيع تفسير الأمر بأي طريقة أخرى.

يبدو أنها لا تُحدّث الصور الرمزية أيضًا، رغم استلام استجابة 200 OK

Started PUT "/u/system/preferences/avatar/pick" for 87.78.131.160 at 2021-04-10 12:55:46 +0000
Processing by UsersController#pick_avatar as */*
  Parameters: {"upload_id"=>"", "type"=>"system", "username"=>"system"}
Completed 200 OK in 15ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 4976)
Started PUT "/u/system/preferences/avatar/pick" for 87.78.131.160 at 2021-04-10 12:55:02 +0000
Processing by UsersController#pick_avatar as */*
  Parameters: {"upload_id"=>"1", "type"=>"gravatar", "username"=>"system"}
Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 5061)
Started PUT "/u/system/preferences/avatar/pick" for 87.78.131.160 at 2021-04-10 12:54:13 +0000
Processing by UsersController#pick_avatar as */*
  Parameters: {"upload_id"=>"695", "type"=>"uploaded", "username"=>"system"}
Completed 200 OK in 17ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 4982)

جميع الطلبات أعلاه تؤدي إلى استعلام إلى عنوان URL أساسي غير صالح:

Started GET "/u/system/preferences/https://tosdr-forum.s3.eu-west-2.jbcdn.net/original/1X/3662711e5030823983d25ac319ce6b9a7ad030e6.png" for 87.78.131.160 at 2021-04-10 12:54:15 +0000
Processing by UserBadgesController#username as JSON
  Parameters: {"username"=>"system"}
ActionController::RoutingError (No route matches [GET] "/u/system/preferences/https:/tosdr-forum.s3.eu-west-2.jbcdn.net/original/1X/3662711e5030823983d25ac319ce6b9a7ad030e6.png")
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:177:in `call'
  Rendering exceptions/not_found.html.erb within layouts/no_ember
  Rendered exceptions/not_found.html.erb within layouts/no_ember (Duration: 0.3ms | Allocations: 105)
  Rendered layouts/_head.html.erb (Duration: 1.2ms | Allocations: 262)
  Rendered common/_discourse_stylesheet.html.erb (Duration: 3.5ms | Allocations: 1094)
Completed 200 OK in 19ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 4961)