2016-04-30 10 views
0

私のウェブサイトでは常にhttpsを使用しようとしています。私はweb.xmlファイルに次のものを持っています:web.xmlのhttpsを常に使用しないでください

<security-constraint> 
    <display-name>All access - GET and POST over SSL</display-name> 
    <web-resource-collection> 
     <web-resource-name>Common area - GET and POST</web-resource-name> 
     <url-pattern>/*</url-pattern> 
     <http-method-omission>GET</http-method-omission> 
     <http-method-omission>POST</http-method-omission> 
    </web-resource-collection> 
    <user-data-constraint> 
     <description/> 
     <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
    </user-data-constraint> 
</security-constraint> 

しかし、それは動作しません。私が何をする必要があるのか​​?

答えて

1

GETPOSTの方法で、http:<http-method-omission>タグでウェブサイトにアクセスすることを明示的に許可しています。

私はあなたが意味を考える:

<http-method>GET</http-method> 
    <http-method>POST</http-method> 

をしかし、あなたは確かにそれらのすべてにHTTPSを強制したいと、単にHTTPメソッドのいずれかの宣言を省略する方が良いだろう。

+0

今、httpsとポート8443を使用していますが、ブラウザで自分のウェブサイトを見ることができません。 – Aliuk

+0

私はERR_CONNECTION_REFUSEDを取得します。 – Aliuk

+0

すべての証明書を正しく設定しましたか? –

関連する問題