From 0baaaedc670e19f9255a173d0a93b752bc620a40 Mon Sep 17 00:00:00 2001 From: youngS Date: Wed, 26 May 2021 14:23:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/utils/storage/aliyunApi.py | 2 +- fir_ser/api/views/receiveudids.py | 4 +++- fir_ser/fir_ser/settings.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fir_ser/api/utils/storage/aliyunApi.py b/fir_ser/api/utils/storage/aliyunApi.py index cbf0e8c..38c66ab 100644 --- a/fir_ser/api/utils/storage/aliyunApi.py +++ b/fir_ser/api/utils/storage/aliyunApi.py @@ -139,7 +139,7 @@ class AliYunOss(object): self.token.request_id = j['RequestId'] self.token.expiration = oss2.utils.to_unixtime(j['Credentials']['Expiration'], '%Y-%m-%dT%H:%M:%SZ') self.token.bucket = self.bucket_name - self.token.endpoint = self.endpoint + self.token.endpoint = self.endpoint.replace('-internal', '') logger.info("get aliyun sts token %s" % self.token.__dict__) return self.token.__dict__ diff --git a/fir_ser/api/views/receiveudids.py b/fir_ser/api/views/receiveudids.py index be0f3fe..80058ac 100644 --- a/fir_ser/api/views/receiveudids.py +++ b/fir_ser/api/views/receiveudids.py @@ -10,6 +10,8 @@ from django.views import View from django.http import HttpResponsePermanentRedirect import logging +from api.utils.baseutils import get_app_domain_name + logger = logging.getLogger(__file__) @@ -26,7 +28,7 @@ class IosUDIDView(View): app_info = Apps.objects.filter(short=short).first() if app_info: - server_domain = get_redirect_server_domain(request, None, app_info.domain_name) + server_domain = get_redirect_server_domain(request, None, get_app_domain_name(app_info)) if app_info.issupersign and app_info.user_id.supersign_active: ios_obj = IosUtils(format_udid_info, app_info.user_id, app_info) status, msg = ios_obj.sign() diff --git a/fir_ser/fir_ser/settings.py b/fir_ser/fir_ser/settings.py index 81a4a96..4619b33 100644 --- a/fir_ser/fir_ser/settings.py +++ b/fir_ser/fir_ser/settings.py @@ -245,7 +245,7 @@ THIRD_PART_CONFIG = { 'secret_key': '2iLIxy9', 'bucket_name': 'fge', 'sts_role_arn': 'ap-sage', - 'endpoint': 'oss-cn-beijing.aliyuncs.com', + 'endpoint': 'oss-cn-beijing-internal.aliyuncs.com', # 服务器和oss在同一个地区,填写内网的endpoint 'is_https': True, 'domain_name': 'aoud.xin', 'download_auth_type': 1, # 1:oss 2:cdn