trpc.group/trpc-go/trpc-go@v1.0.3/testdata/trpc_go_restful_cors.yaml (about)

     1  global:                             # global config.
     2    namespace: Development            # environment type, two types: production and development.
     3    env_name: test                    # environment name, names of multiple environments in informal settings.
     4  
     5  server:                                            # server configuration.
     6    app: test                                        # business application name.
     7    server: helloworld                               # service process name.
     8    bin_path: /usr/local/trpc/bin/                   # paths to binary executables and framework configuration files.
     9    conf_path: /usr/local/trpc/conf/                 # paths to business configuration files.
    10    data_path: /usr/local/trpc/data/                 # paths to business data files.
    11    filter:
    12      - cors
    13    service:                                         # the route name of the service.
    14      - name: trpc.test.helloworld.Greeter           # the route name of the service.
    15        ip: 127.0.0.1                                # the service listening ip address, can use the placeholder ${ip}, choose one of ip and nic, priority ip.
    16        nic: eth0                                    # the service listening network card address, if configures ip, you don't need to configure it.
    17        port: 4477                                   # the service listening port, can use the placeholder ${port}.
    18        network: tcp                                 # the service listening network type,  tcp or udp.
    19        protocol: restful                            # application layer protocol, trpc or http.
    20  plugins:
    21    auth:
    22      cors:
    23        /v1/foobar:
    24          - qq.com
    25          - oa.com
    26        maxage:
    27          - 101s
    28