update
This commit is contained in:
parent
fbaf93e426
commit
1bf921a56e
@ -27,18 +27,6 @@ services:
|
||||
- app-network
|
||||
restart: unless-stopped
|
||||
|
||||
static-provider:
|
||||
image: nginx:alpine
|
||||
container_name: static-provider
|
||||
ports:
|
||||
- "3005:80" # Nginx static files
|
||||
volumes:
|
||||
- ./static-files:/static-files
|
||||
- ./static-provider/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
networks:
|
||||
- app-network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import axios from "axios";
|
||||
|
||||
const API_BASE_URL = "https://api.med.tomastm.com";
|
||||
const RESOURCES_BASE_URL = "https://resources.med.tomastm.com";
|
||||
//const RESOURCES_BASE_URL = "https://resources.med.tomastm.com";
|
||||
const RESOURCES_BASE_URL = "https://api.med.tomastm.com/content";
|
||||
|
||||
export const apiInstance = axios.create({
|
||||
baseURL: API_BASE_URL,
|
||||
|
||||
@ -97,6 +97,17 @@ app.get(
|
||||
}),
|
||||
);
|
||||
|
||||
// Serve static files with automatic ETag handling
|
||||
app.use(
|
||||
"/content",
|
||||
express.static(STATIC_DIR, {
|
||||
etag: true, // Enable automatic ETag generation
|
||||
lastModified: true, // Include Last-Modified header
|
||||
maxAge: 3600000, // Cache for 1 hour, but always revalidate
|
||||
immutable: false, // Files can change
|
||||
}),
|
||||
);
|
||||
|
||||
app.get(
|
||||
"/structure",
|
||||
asyncHandler(async (req, res) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user