<

Your Cookie Settings

Site functionality and performance. These cookies are required for NGINX site functionality and are therefore always enabled. They contain no identifiable information.

Social media and advertising. Cookies that help connect to social networks, and advertising cookies (of third parties) to help better tailor NGINX advertising to your interests

Have a 🍪? :)

nginx.com uses cookies to provide functionality and performance. Privacy Policy.

Web Server Load Balancing with NGINX Plus
  • Free Trial
  • Contact Us
Web Server Load Balancing with NGINX Plus
  • Products
    • NGINX Plus
    • NGINX Controller
    • NGINX Unit
    • NGINX WAF
    • NGINX Amplify
  • Solutions
    • ADC / Load balancing
    • Microservices
    • Cloud
    • Security
    • Web & mobile performance
    • API gateway
  • Resources
    • Documentation
    • Ebooks
    • Webinars
    • Case studies
    • FAQ
    • Glossary
    • Third party integrations
  • Support
    • NGINX Plus support
    • Training
    • Professional Services
  • Pricing
  • Blog
Login
1-800-915-9122

Navigation

  • index
  • next |
  • previous |
  • NGINX Documentation »
  • Welcome to the NGINX and NGINX Plus documentation »
  • Admin Guide »
  • Dynamic Modules »

NGINX Documentation

  • NGINX Plus
    • Admin Guide
      • Installing NGINX and NGINX Plus
        • Installing NGINX Plus
        • Installing NGINX Open Source
        • Installing NGINX Plus AMIs on Amazon EC2
        • Installing NGINX Plus on the Google Cloud Platform
        • Installing NGINX Plus on Microsoft Azure
        • Deploying NGINX and NGINX Plus on Docker
      • Basic Functionality
        • Controlling NGINX Processes at Runtime
        • Creating NGINX Plus and NGINX Configuration Files
      • Load Balancer
        • HTTP Load Balancing
        • TCP and UDP Load Balancing
        • HTTP Health Checks
        • TCP Health Checks
        • UDP Health Checks
        • Configuring Dynamic Load Balancing with the NGINX Plus API
        • Accepting the PROXY Protocol
      • Content Cache
        • NGINX Content Caching
      • Web Server
        • Configuring NGINX Plus as a Web Server
        • Serving Static Content
        • NGINX Reverse Proxy
        • Compression and Decompression
        • Using NGINX and NGINX Plus as an Application Gateway with uWSGI and Django
      • Security Controls
        • NGINX SSL Termination
        • SSL Termination for TCP Upstream Servers
        • Restricting Access with HTTP Basic Authentication
        • Authentication Based on Subrequest Result
        • Setting up JWT Authentication
        • Limiting Access to Proxied HTTP Resources
        • Restricting Access to Proxied TCP Resources
        • Restricting Access by Geographical Location
        • Securing HTTP Traffic to Upstream Servers
        • Securing TCP Traffic to Upstream Servers
        • Dynamic Blacklisting of IP Addresses
      • Monitoring
        • Live Activity Monitoring
        • Configuring Logging
        • Debugging NGINX
        • Monitoring NGINX and NGINX Plus with the New Relic Plug-In
      • High Availability
        • High Availability Support for NGINX Plus in On-Premises Deployments
        • Configuring Active-Active High Availability and Additional Passive Nodes with keepalived
        • Synchronizing NGINX Configuration in a Cluster
        • Runtime State Sharing in a Cluster
      • Dynamic Modules
        • Dynamic Modules
        • Brotli
        • Cookie-Flag
        • Encrypted-Session
        • GeoIP
        • GeoIP2
        • Headers-More
        • HTTP Substitutions Filter
        • Image-Filter
        • Lua
        • njs Scripting Language
        • NGINX WAF
        • OpenTracing
        • Phusion Passenger Open Source
        • Perl
        • RTMP
        • Set-Misc
        • XSLT
      • Mail Proxy
        • Configuring NGINX as a Mail Proxy Server
    • Deployment Guides
      • Active-Active HA for NGINX Plus on AWS Using AWS Network Load Balancer
      • Active-Passive HA for NGINX Plus on AWS Using Elastic IP Addresses
      • Creating Amazon EC2 Instances for NGINX Open Source and NGINX Plus
      • All-Active HA for NGINX Plus on the Google Cloud Platform
      • Load Balancing Apache Tomcat Servers with NGINX Open Source and NGINX Plus
      • Load Balancing Microsoft Exchange Servers with NGINX Plus
      • Load Balancing Node.js Application Servers with NGINX Open Source and NGINX Plus
      • Load Balancing Oracle E-Business Suite with NGINX Plus
      • Load Balancing Oracle WebLogic Server with NGINX Open Source and NGINX Plus
      • Load Balancing Wildfly and JBoss Application Servers with NGINX Open Source and NGINX Plus
      • Global Server Load Balancing with Amazon Route 53 and NGINX Plus
      • Migrating Load Balancer Configuration from Citrix NetScaler to NGINX Plus
      • Migrating Load Balancer Configuration from F5 BIG-IP LTM to NGINX Plus
      • Setting Up an NGINX Demo Environment
      • Enabling Single Sign-On for Proxied Applications
        • Okta
    • Releases
    • Technical Specifications
    • Open Source Components
    • Directives
  • NGINX Controller
    • Admin Guide
      • Installing NGINX Controller
    • Technical Specifications
    • Releases
  • NGINX Unit
  • NGINX Amplify
  • NGINX WAF
    • Admin Guide
      • Installing NGINX WAF
      • Using the OWASP CRS with NGINX WAF
      • Using the ModSecurity Rules from Trustwave SpiderLabs with NGINX WAF
    • Technical Specifications

Cookie-Flag

Table of Contents

  • Cookie-Flag
    • Installation Instructions

Set the flags HttpOnly, SameSite, and secure for cookies in Set-Cookie upstream response headers.

Installation Instructions

  1. Install the Cookie-Flag module.

    For Amazon Linux, CentOS, Oracle Linux, and RHEL:

    $ yum install nginx-plus-module-cookie-flag
    

    For Debian and Ubuntu:

    $ apt-get install nginx-plus-module-cookie-flag
    

    For SLES:

    $ zypper install nginx-plus-module-cookie-flag
    
  2. Put the following directive in the top-level (“main”) context of the main NGINX Plus configuration file, /etc/nginx/nginx.conf:

    load_module modules/ngx_http_cookie_flag_filter_module.so;
    
  3. Perform additional configuration as required by the module.

  4. Reload NGINX Plus to enable the module:

    $ nginx -t && nginx -s reload
    
previous ←

Brotli

next →

Encrypted-Session

Navigation

  • index
  • next |
  • previous |
  • NGINX Documentation »
  • Welcome to the NGINX and NGINX Plus documentation »
  • Admin Guide »
  • Dynamic Modules »

Need help from NGINX directly?

free trial contact us today
  • Products
    • NGINX Plus
    • NGINX Controller
    • NGINX Unit
    • NGINX Amplify
    • NGINX Web Application Firewall
  • NGINX on Github
    • NGINX Open Source
    • NGINX Unit
    • NGINX Amplify
    • NGINX Kubernetes Ingress Controller
    • nginMesh
    • NGINX Microservices Reference Architecture
    • NGINX Crossplane
  • Solutions
    • ADC / Load balancing
    • Microservices
    • Cloud
    • Security
    • Web & mobile performance
    • API Gateway
  • Resources
    • Documentation
    • Ebooks
    • Webinars
    • Case studies
    • Blog
    • FAQ
    • Glossary
  • Support
    • Professional Services
    • Training
  • Partners
    • Amazon Web Services
    • Google Cloud Platform
    • IBM
    • Microsoft Azure
    • Red Hat
    • Certified module program
  • Company
    • About NGINX
    • Careers
    • Leadership
    • Press
    • Events
Connect With Us
  • facebook
  • twitter
  • linkedin
  • NGINX Youtube Channel
  • rss
Stay in the Loop
Copyright © NGINX Inc. All rights reserved. | Privacy Policy