Skip to content

Commit

Permalink
💚 update backend url
Browse files Browse the repository at this point in the history
  • Loading branch information
lazhenyi committed Nov 20, 2024
1 parent d776f94 commit a5b9e61
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
17 changes: 15 additions & 2 deletions chart/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitdata-rust
name: gitdata-rust
namespace: gitdata
annotations:
meta.helm.sh/release-name: gitdata-rust
nginx.ingress.kubernetes.io/proxy-connect-timeout: "30"
nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"
nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,Content-Type,Authorization,Origin,Accept,Access-Control-Request-Method,Access-Control-Request-Headers" # 允许的请求头
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, PATCH, OPTIONS"
nginx.ingress.kubernetes.io/cors-max-age: "86400"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-expose-headers: "Content-Length,Content-Range"

labels:
apptype: gitdata-rust
app.kubernetes.io/managed-by: Helm
heritage: Helm
release: gitdata-rust
release: gitdata-rust
spec:
ingressClassName: {{.Values.ingress_name}}
rules:
Expand All @@ -25,5 +31,12 @@ spec:
backend:
service:
name: gitdata-rust-service
port:
number: 80
- path: /api/
pathType: Prefix
backend:
service:
name: jzfs-rust-service
port:
number: 80
2 changes: 0 additions & 2 deletions src/app/auth/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ const Register = () => {
}
}
useEffect(() => {
console.log(isCountDown)
console.log(CountDown)
if (isCountDown){
const timer = setTimeout(() => {
setCountDown(CountDown - 1)
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Nets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Nets extends Urls {
constructor() {
super();
}
public baseUrl = "https://v1.jiaozifs.com";
public baseUrl = "/api";
// @eslint-disable-next-line @typescript-eslint/no-explicit-any
public async POST(
urls: string,
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://221.128.225.26:34513",
target: "https://v1.jiaozifs.com",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
Expand Down

0 comments on commit a5b9e61

Please sign in to comment.