Date filter doesn't work with reverse proxy

Hello,

I’m having a problem using date filter inside the dashboard.

After I use Nginx as a reverse proxy, date filter does not work,
when I tried to embed this dashboard in other application.

Does anybody know if there is anything I have to change some setting?

Kind regards,

Hi @YN_test
Post “Diagnostic Info” from Admin > Troubleshooting.
And make sure your Site URL is correct in Admin > Settings > General.

Hello @flamber Here is Diagnostic Info:

{
“browser-info”: {
“language”: “ja”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “MS932”,
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_201-b09”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_201”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“java.vm.version”: “25.201-b09”,
“os.name”: “Windows Server 2016”,
“os.version”: “10.0”,
“user.language”: “en”,
“user.timezone”: “Asia/Tokyo”
},
“metabase-info”: {
“databases”: [
“postgres”,
“mysql”,
“mongo”,
“h2”
],
“hosting-env”: “unknown”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “9.6.11”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.8”
}
},
“run-mode”: “prod”,
“version”: {
“tag”: “v0.37.0.1”,
“date”: “2020-10-23”,
“branch”: “release-x.37.x”,
“hash”: “13dd8f9”
},
“settings”: {
“report-timezone”: null
}
}
}

@YN_test
I cannot reproduce.
I don’t know if you have set the Site URL correctly.
Which database are you querying?
Which type of questions is it?
Which type of filters is it?
Does this also happen, when you use the embedding - not just in the example window?

@flamber Hello
I think I changed the Site URL correctly, when I configured Nginx as the reverse proxy.

The database I query is PostgreSQL.
For the type of questions, I chose “the simple question mode”, then “visualization” is “Bar” (x-ray: timestamp, y-ray: value), and filter with column:ID.
and the type of filter is “Time filters: All Options”, and set “Current” & “Day”.

This also happened when I displayed the embedded graph in other application.

@YN_test
Post your Nginx configuration.
Post your Site URL.
What is in the URL, when you use normal dashboard vs embedded dashboard?
The problem is not Metabase - it’s the reverse-proxy setup.

@flamber
Nginx configuration:

 # HTTPS server
 #

 resolver xx.xx.xx.xx;

 upstream web1 {
   server             xxxx.xxxx.xxxx.xxxx.com:3000;
   keepalive_timeout  30;
 }

 upstream web2 {
   server             127.0.0.1:8443;
   keepalive_timeout  30;
 }

 map $http_upgrade $connection_upgrade {
   default upgrade;
   ''      close;
 }

 server {
     listen       8443 ssl;
     server_name  web1;
     index index.php index.html;
     root C:/xxxx/project/TEST1/public;

     add_header X-Frame-Options SAMEORIGIN;
     add_header X-Content-Type-Options nosniff;

     ssl_certificate      C:/nginx-1.16.1/ssl/xxxx.xxxx.xxxx.xxxx.com.crt;
     ssl_certificate_key  C:/nginx-1.16.1/ssl/xxxx.xxxx.xxxx.xxxx.key;

     ssl_session_cache    shared:SSL:1m;
     ssl_session_timeout  5m;

     ssl_ciphers  HIGH:!aNULL:!MD5;
     ssl_prefer_server_ciphers  on;

     location / {
         try_files $uri $uri/ /index.php?$query_string;
     }

     proxy_set_header    Host    $host;

     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection $connection_upgrade;
     proxy_set_header Referer "";

     proxy_set_header    X-Real-IP    $remote_addr;
     proxy_set_header    X-Forwarded-Host       $host;
     proxy_set_header    X-Forwarded-Server    $host;
     proxy_set_header    X-Forwarded-For    $proxy_add_x_forwarded_for;

     proxy_set_header    X-Forwarded-Proto $scheme;
     proxy_http_version 1.1;
     proxy_read_timeout 600s;
     proxy_send_timeout 600s;

    location /metabase/ {
          rewrite ^/metabase/(.+) $1 break;
          proxy_pass https://web1/$1;
    }

     location ~ \.php$ {
       root C:/xxxx/project/TEST1/public;
       fastcgi_split_path_info ^(.+\.php)(/.+)$;
       fastcgi_pass 127.0.0.1:9000;
       fastcgi_index index.php;
       include fastcgi_params;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       fastcgi_param PATH_INFO $fastcgi_path_info;
     }
 }

Site URL

https://xxxx.xxxx.xxxx.xxxx.com:8443/metabase

@YN_test
I’m not sure what the screenshot is supposed to show - that Public sharing, not Embedding.
Check you Nginx logs and perhaps enable debug logging, so you can see more information.

@flamber
Sorry for the screenshot. Here is the embedded dashboard,
the date filters work on the dashboard in Metabase, but don’t work on the embedded dashboard in other application.
I’ll check the debug log of Nginx.