How to set domain name in docker?

Hello all, I have installed seafile via docker, nginx was also installed so that only one port would be exposed. Everything works well at localhost, but after I deployed it to the cloud, an CORS error occoured when uploading files, the error described as follows:

load http://127.0.0.1:8082/upload-aj/4a3dd23b-cf26-4d21-b61f-0b2942624265. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://mydomain:8100’ is therefore not allowed access. The response had HTTP status code 400.

It was deployed on mydomain, and 8100 was exposed for nginx, here is the seafile.conf:

server {
        listen 80; #IPv4

        server_name 127.0.0.1;
        proxy_set_header X-Forwarded-For $remote_addr;

        location / {
                fastcgi_pass    127.0.0.1:8000;
                fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
                fastcgi_param   PATH_INFO           $fastcgi_script_name;

                fastcgi_param   SERVER_PROTOCOL     $server_protocol;
                fastcgi_param   QUERY_STRING        $query_string;
                fastcgi_param   REQUEST_METHOD      $request_method;
                fastcgi_param   CONTENT_TYPE        $content_type;
                fastcgi_param   CONTENT_LENGTH      $content_length;
                fastcgi_param   SERVER_ADDR         $server_addr;
                fastcgi_param   SERVER_NAME         $server_name;
                fastcgi_param   REMOTE_ADDR         $remote_addr;

                access_log      /var/log/nginx/seahub.access.log;
                error_log       /var/log/nginx/seahub.error.log;
        }

        location /seafhttp {
                rewrite                 ^/seafhttp(.*)$ $1 break;

                proxy_pass              http://127.0.0.1:8082;
                proxy_connect_timeout   36000s;
                proxy_read_timeout      36000s;

                client_max_body_size    0;

                access_log      /var/log/nginx/seafhttp.access.log;
                error_log       /var/log/nginx/seafhttp.error.log;
        }

        location /media {
                root /opt/seafile/seafile-server-latest/seahub;
        }
}

ccnet.conf

[General]
USER_NAME = dfdoc
ID = c126345082fa89d85166bd8dfac888cc4a4e2b8d
NAME = dfdoc
SERVICE_URL = http://127.0.0.1:80

[Client]
PORT = 13419

seahub_settings.py

# -*- coding: utf-8 -*-
SECRET_KEY = "b_o8u$kxo3p%f7p@7k!u-ei@01rsekuvp_n0!*g&$wqwxo1@i^"
FILE_SERVER_ROOT = 'http://127.0.0.1:80/seafhttp'

Any suggestion will be appreciated!