-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: frontend docker nginx configuration add brower cache accelerated pages access #7125
base: main
Are you sure you want to change the base?
feat: frontend docker nginx configuration add brower cache accelerated pages access #7125
Conversation
This reverts commit 7aed45e.
This reverts commit 7aed45e.
hey @jeevic Thank you for this! How's your experience with the nginx setup with Langflow? Have you managed to get a working deployment with frontend under nginx and the backend as a separate container/service? |
yes, we deploy langflow separate deployment of front-end and back-end。in our practice,during the access, the front-end page will block the python web server。 We chose Langflow for its visual orchestration capabilities. |
@@ -13,6 +13,8 @@ server { | |||
root /usr/share/nginx/html; | |||
index index.html index.htm; | |||
try_files $uri $uri/ /index.html =404; | |||
expires 1d; | |||
add_header Cache-Control "public"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some reading and am interested in your thoughts @jeevic - for react, it's recommended to not cache index.html, since a new deploy may change where the new bundle is, and a cached index will point to a non-existent path.
chatgpt recommended:
location ~* /index\.html$ {
expires -1;
add_header Cache-Control "no-store, must-revalidate";
}
@Cristhianzl that make sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i accept your opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jordanrfrazier you are correct.
we shouldn't be caching index.html, the index.html file serves as the entry point and typically includes references to versioned assets.
nginx add configuration browser caching improves front-end page response speed