This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/answer-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 46410f376 fix: delete nginx.conf file
46410f376 is described below

commit 46410f376bc6156873437984e5427c90b7a7e302
Author: shuai <[email protected]>
AuthorDate: Mon Feb 17 15:48:00 2025 +0800

    fix: delete nginx.conf file
---
 Dockerfile                              |  3 ---
 nginx.conf                              | 31 -------------------------------
 src/components/HomePageHeader/index.tsx |  2 +-
 3 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 5a844dede..5560e5b24 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,5 @@
 FROM nginx:alpine
 
-RUN rm /etc/nginx/conf.d/default.conf
-COPY nginx.conf /etc/nginx/conf.d/default.conf
-
 COPY ./build /usr/share/nginx/html
 EXPOSE 80
 
diff --git a/nginx.conf b/nginx.conf
deleted file mode 100644
index 34009b23b..000000000
--- a/nginx.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-server {
-    listen 80;
-    server_name localhost;
-
-    # 静态文件服务
-    location / {
-        root /usr/share/nginx/html;
-        index index.html;
-        try_files $uri $uri/ /index.html;
-    }
-
-    location /github-stars/ {
-        proxy_pass https://img.shields.io/github/stars/;
-        proxy_set_header Host img.shields.io;
-        proxy_set_header X-Real-IP $remote_addr;
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        proxy_set_header X-Forwarded-Proto $scheme;
-        proxy_ssl_protocols TLSv1.2 TLSv1.3;
-        proxy_ssl_ciphers HIGH:!aNULL:!MD5;
-    }
-
-    location /mixpanel/ {
-        proxy_pass https://api-js.mixpanel.com/track/;
-        proxy_set_header Host api-js.mixpanel.com;
-        proxy_set_header X-Real-IP $remote_addr;
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        proxy_set_header X-Forwarded-Proto $scheme;
-        proxy_pass_request_headers on;
-        proxy_pass_request_body on;
-    }
-}
diff --git a/src/components/HomePageHeader/index.tsx 
b/src/components/HomePageHeader/index.tsx
index e350f56e9..48ed3412a 100644
--- a/src/components/HomePageHeader/index.tsx
+++ b/src/components/HomePageHeader/index.tsx
@@ -40,7 +40,7 @@ const HomeHead: FC = () => {
 
 
   useEffect(() => {
-    fetch('/github-stars/apache/answer')
+    fetch('https://img.shields.io/github/stars/apache/answer')
       .then((response) => response.text())
       .then((data) => {
         const num = data.match(/<text .*>(.*?)<\/text>/)[1];

Reply via email to