使用Cloudfront作为带有https的HAProxy后端服务器

使用Cloudfront作为带有https的HAProxy后端服务器,https,amazon-cloudfront,haproxy,Https,Amazon Cloudfront,Haproxy,我的S3存储桶前面有一个CloudFront资源。可以在- https://<id>.cloudfront.net 如何从HAProxy中的这个服务器块点击HTTPS cloudfront?我想您需要为cloudfront后端的请求头添加一些信息 此示例适用于HAProxy 2.0 backend my_cloudfront_app http-response set-header Strict-Transport-Security max-age=31536000

我的S3存储桶前面有一个CloudFront资源。可以在-

https://<id>.cloudfront.net

如何从HAProxy中的这个服务器块点击HTTPS cloudfront?

我想您需要为cloudfront后端的请求头添加一些信息

此示例适用于HAProxy 2.0

backend my_cloudfront_app
    http-response set-header Strict-Transport-Security max-age=31536000

    # Add backend header for cloudfront backend request
    http-request set-header Host <id>.cloudfront.net

    # maybe you will need to add a S3 prefix to the request path
    # http-request set-path <CLOUDFRONT_S3_Prefix>%[path] 

    server my_server <id>.cloudfront.net:443 sni str(<id>.cloudfront.net) ssl verify none
后端my_cloudfront_应用程序
http响应集标头严格传输安全最大年龄=31536000
#为cloudfront后端请求添加后端标头
http请求集头主机.cloudfront.net
#也许您需要在请求路径中添加一个S3前缀
#http请求设置路径%[路径]
服务器my_server.cloudfront.net:443 sni str(.cloudfront.net)ssl验证无
backend my_cloudfront_app
    http-response set-header Strict-Transport-Security max-age=31536000
    server my_server <id>.cloudfront.net:443
backend my_cloudfront_app
    http-response set-header Strict-Transport-Security max-age=31536000

    # Add backend header for cloudfront backend request
    http-request set-header Host <id>.cloudfront.net

    # maybe you will need to add a S3 prefix to the request path
    # http-request set-path <CLOUDFRONT_S3_Prefix>%[path] 

    server my_server <id>.cloudfront.net:443 sni str(<id>.cloudfront.net) ssl verify none