Legacy Knowledge Base
公開されました Jul. 2, 2025

LiferayはCookieのサイトベースを作っているのでしょうか?

Written By

Pooja Bhambani

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • Liferayはクッキーのサイトベースを作っているのでしょうか? もしそうなら、Liferayサーバーの一体どこにすべてのクッキーが物理的に保管されるのでしょうか?

Environment

  • Liferay DXP 7.1
  • Liferay DXP 7.2
  • Liferay DXP 7.3

解決策

  • Liferayのクッキーの大半は「Persistent」タイプです。 例えば、ログイン時に "Remember me "ボタンをクリックしてユーザーを識別することを選択した場合、Liferayは長期間の暗号化クッキーを保持し、ユーザーが戻ってきたときにユーザー名などの情報がすでに保存されているようにします。

    • このカテゴリには、クッキーの有効期限に応じて、ユーザーが消去するか、またはブラウザが消去するまでハードドライブに残るすべてのクッキーが含まれます。 永続的なクッキーの長さは様々ですが、いずれも有効期限をコーディングに埋め込んでいます。 ePrivacy指令では、12ヶ月で失効することになっていますが、実際には、何もしなければ、もっと長い間デバイスに残ってしまうかもしれません。

  • クッキーはブラウザレベルでのみ生成され、セッションが終了すると破棄されます。 Cookieに関連するLiferayサーバーに物理的なコピーが保存されることはありません。

追加情報

  • ただし、以下のプロパティでは、Cookieの有効・無効を設定することができます。
    # Set this to the maximum age (in number of seconds) of the browser cookie that enables the "remember me" feature. A value of 31536000 signifies lifespan of one year. A value of -1 signifies a lifespan of a browser session.
    
    company.security.auto.login.max.age=31536000
    
    # Set this to false to disable all persistent cookies. Features like automatically logging in will not work.  
    
     session.enable.persistent.cookies=true
     
    # Set this to true to use the full hostname for cookie domain values. By default the domain is trimmed to use only the root domain to allow cross domain logins.
    
     session.cookie.use.full.hostname=false 
     session.cookie.use.full.hostname[tomcat]=true
     
    # Set this to true to test whether users have cookie support before allowing them to sign in. 
    
     session.test.cookie.support=true
Did this article resolve your issue ?

Legacy Knowledge Base