修复生产登录页面缓存
This commit is contained in:
@@ -4,7 +4,7 @@ import { useDidShow } from "@tarojs/taro";
|
|||||||
import { createH5Ticket, getToken } from "../../services/api";
|
import { createH5Ticket, getToken } from "../../services/api";
|
||||||
|
|
||||||
const H5_URL = String(process.env.TARO_APP_H5_URL ?? "https://wanderq.nianxx.com");
|
const H5_URL = String(process.env.TARO_APP_H5_URL ?? "https://wanderq.nianxx.com");
|
||||||
const H5_CACHE_VERSION = "auth-20260724-v1";
|
const H5_CACHE_VERSION = "auth-20260724-v2";
|
||||||
|
|
||||||
function buildH5Src(ticket?: string) {
|
function buildH5Src(ticket?: string) {
|
||||||
const separator = H5_URL.includes("?") ? "&" : "?";
|
const separator = H5_URL.includes("?") ? "&" : "?";
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
location = /index.html {
|
||||||
|
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
||||||
|
add_header Pragma "no-cache" always;
|
||||||
|
add_header Expires "0" always;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user