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 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

        proxy_set_header X-Forwarded-For $remote_addr;

        location / {
                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    ;
                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;


USER_NAME = dfdoc
ID = c126345082fa89d85166bd8dfac888cc4a4e2b8d
NAME = dfdoc

PORT = 13419

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

Any suggestion will be appreciated!