feat: Add /info endpoint for details about the Appsmith version running (#27345)

This just responds with the contents of `/opt/appsmith/info.json` as is,
with a JSON content type.

This will enable showing the right date on the frontend, as well as on
Flow. See [this Slack
thread](https://theappsmith.slack.com/archives/C02MUD8DNUR/p1694762058953999?thread_ts=1694757060.520329&cid=C02MUD8DNUR)
for the confusion we're solving for.
This commit is contained in:
Shrikant Sharat Kandula 2023-09-15 15:50:52 +05:30 committed by GitHub
parent e78aa1193e
commit 9d68025fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,11 @@ fi
try_files /loading.html \$uri /index.html =404;
}
location = /info {
add_header Content-Type application/json;
alias /opt/appsmith/info.json;
}
location ~ ^/static/(js|css|media)\b {
# Files in these folders are hashed, so we can set a long cache time.
add_header Cache-Control "max-age=31104000, immutable"; # 360 days