瀏覽代碼

Merge pull request #13211 from overleaf/jpa-hotfix-4-0-1

[server-pro] prepare hotfix 4.0.1

GitOrigin-RevId: 42b543d5468614a820ca7f9f29c5c6b83d1f7e69
Miguel Serrano 3 年之前
父節點
當前提交
63dbea0092

+ 9 - 0
server-ce/hotfix/4.0.1/Dockerfile

@@ -0,0 +1,9 @@
+FROM sharelatex/sharelatex:4.0.0
+
+# Patch: Block access to metrics endpoint
+COPY pr_13229_ce_only.patch .
+RUN patch -p0 --directory=/ < pr_13229_ce_only.patch
+
+# Patch: Remove documentation link from editor outline
+COPY outline_doc_icon.patch .
+RUN patch -p0 < outline_doc_icon.patch

+ 9 - 0
server-ce/hotfix/4.0.1/outline_doc_icon.patch

@@ -0,0 +1,9 @@
+--- services/web/app/views/project/editor/file-tree-react.pug
++++ services/web/app/views/project/editor/file-tree-react.pug
+@@ -38,5 +38,3 @@ aside.editor-sidebar.full-size
+ 				highlighted-line="highlightedLine"
+ 				show="show"
+ 			)
+-
+-	documentation-button
+\ No newline at end of file

+ 14 - 0
server-ce/hotfix/4.0.1/pr_13229_ce_only.patch

@@ -0,0 +1,14 @@
+--- etc/nginx/sites-enabled/sharelatex.conf
++++ etc/nginx/sites-enabled/sharelatex.conf
+@@ -4,6 +4,11 @@ server {
+
+ 	root /overleaf/services/web/public/;
+
++	# block external access to prometheus /metrics
++	location /metrics {
++		internal;
++	}
++
+ 	location / {
+ 		proxy_pass http://127.0.0.1:3000;
+ 		proxy_http_version 1.1;