# PostgreSQL Client Authentication Configuration File # 允许远程连接 # TYPE DATABASE USER ADDRESS METHOD # 本地连接 local all all trust # IPv4 本地连接 host all all 127.0.0.1/32 scram-sha-256 # IPv6 本地连接 host all all ::1/128 scram-sha-256 # 允许来自任何 IP 的连接(开发环境) # 生产环境应该限制为具体 IP 或网段 host all all 0.0.0.0/0 scram-sha-256 host all all ::/0 scram-sha-256 # Docker 网络 host all all 172.16.0.0/12 scram-sha-256