---
title: "flex.messaging.security.SecurityException: Secure endpoint '/messagebroker/amfse"
author: "董瑞龙"
date: "2015-12-22T09:15:34Z"
tags: []
categories: ["Web前端"]
slug: "flex-messaging-security-securityexception-secure-endpoint-messagebroker-amfse"
draft: false
lastmod: "2015-12-22T09:17:57Z"
id: 2265638
url: "https://rylan.iteye.com/blog/2265638"
---

flex.messaging.security.SecurityException: Secure endpoint '/messagebroker/amfsecure' must be contacted via a secure protocol
报错

经过排查需要更改如下配置：services-config.xml
<channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>
改为
<channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>
		
参考链接：
http://blogs.adobe.com/kmossman/2010/02/lcds_with_ssl_termination_with.html