转发将标头代理到当前请求,配合 Nginx 使用,获取用户真实IP。
public override void OnApplicationInitialization(ApplicationInitializationContext context) { ... pp.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto }); ... }本篇介绍了如何使用AutoMapper,搞定对象到对象间的映射,篇幅简短,内容比较简单,你学会了吗?