'AWS OpenSearch running in vpc behind Nginx dont show the tenants

I have an opensearch instance which is in a VPC behind an nginx proxy

I cannot see the tenantes in Opensearch, I can create them but not see them. And when I want to change the tenante he tells me “Failed to switch tenant. Invalid cookie” are there people who have encountered the same problems. Thank you

here is my configuration : I took the aws configuration enter image description here

server {
listen 443;
server_name $host;
rewrite ^/$ https://$host/_dashboards redirect;

ssl_certificate           /etc/nginx/cert.crt;
ssl_certificate_key       /etc/nginx/cert.key;

ssl on;
ssl_session_cache  builtin:1000  shared:SSL:10m;
ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;

location /_dashboards {
    # Forward requests to Dashboards
    proxy_pass https://$domain-endpoint/_dashboards;

    # Handle redirects to Cognito
    proxy_redirect https://$cognito_host https://$host;

    # Update cookie domain and path
    proxy_cookie_domain $domain-endpoint $host;
    proxy_cookie_path / /_dashboards/;

    # Response buffer settings
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;
}

location ~ \/(log|sign|fav|forgot|change|saml|oauth2) {
    # Forward requests to Cognito
    proxy_pass https://$cognito_host;

    # Handle redirects to Dashboards
    proxy_redirect https://$domain-endpoint https://$host;

    # Update cookie domain
    proxy_cookie_domain $cognito_host $host;
}

}



Solution 1:[1]

The line

proxy_cookie_path / /_dashboards/;

Should be

proxy_cookie_path ~/ /_dashboards/;

Note the ~. Encountered the same issue and this fixed it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 A Spoty Spot