From db85fff344cd378032cfc562b25312841780cffd Mon Sep 17 00:00:00 2001 From: Sergey Kirichenko Date: Thu, 11 Apr 2024 12:07:24 +0300 Subject: [PATCH 1/3] Add static campaings to nginx (#199) --- install/docker/Dockerfile.app | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/docker/Dockerfile.app b/install/docker/Dockerfile.app index e7ed2dfff3..fcc5b625e5 100644 --- a/install/docker/Dockerfile.app +++ b/install/docker/Dockerfile.app @@ -42,7 +42,8 @@ RUN apt-get -y update && \ ADD https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/git/refs/heads/${GIT_BRANCH} version.json RUN git clone -b ${GIT_BRANCH} https://github.com/ONLYOFFICE/DocSpace-buildtools.git ${SRC_PATH}/buildtools && \ git clone --recurse-submodules -b ${GIT_BRANCH} https://github.com/ONLYOFFICE/DocSpace-Server.git ${SRC_PATH}/server && \ - git clone -b ${GIT_BRANCH} https://github.com/ONLYOFFICE/DocSpace-Client.git ${SRC_PATH}/client + git clone -b ${GIT_BRANCH} https://github.com/ONLYOFFICE/DocSpace-Client.git ${SRC_PATH}/client && \ + git clone -b "master" --depth 1 https://github.com/ONLYOFFICE/ASC.Web.Campaigns.git ${SRC_PATH}/campaigns RUN cd ${SRC_PATH} && \ mkdir -p /app/onlyoffice/config/ && \ @@ -148,6 +149,7 @@ COPY --from=base /etc/nginx/conf.d /etc/nginx/conf.d COPY --from=base /etc/nginx/includes /etc/nginx/includes COPY --from=base ${SRC_PATH}/publish/web/client ${BUILD_PATH}/client COPY --from=base ${SRC_PATH}/publish/web/public ${BUILD_PATH}/public +COPY --from=base ${SRC_PATH}/campaigns/src/campaigns ${BUILD_PATH}/public/campaigns COPY --from=base ${SRC_PATH}/publish/web/management ${BUILD_PATH}/management COPY --from=base ${SRC_PATH}/buildtools/install/docker/config/nginx/docker-entrypoint.d /docker-entrypoint.d COPY --from=base ${SRC_PATH}/buildtools/install/docker/config/nginx/templates/upstream.conf.template /etc/nginx/templates/upstream.conf.template From ee2b0dcd5cf9c24a4f0840f751261eb7661647e4 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Thu, 11 Apr 2024 15:42:20 +0300 Subject: [PATCH 2/3] Config: Nginx: Added no hash for sdk directory --- config/nginx/onlyoffice.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nginx/onlyoffice.conf b/config/nginx/onlyoffice.conf index 0489de7a5b..4308528093 100644 --- a/config/nginx/onlyoffice.conf +++ b/config/nginx/onlyoffice.conf @@ -45,7 +45,7 @@ map $request_uri $header_x_frame_options { map $request_uri $cache_control { default "no-cache, no-store, no-transform"; ~*\/(filehandler\.ashx\?action=(thumb|preview))|\/(storage\/room_logos\/root\/.*\?hash.*|storage\/userPhotos\/root\/.*\?hash.*|storage\/whitelabel\/root\/.*\?hash.*|storage\/static_partnerdata\/root\/.*\?hash.*) "must-revalidate, no-transform, immutable, max-age=31536000"; - ~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts\/api\.js|static\/scripts\/api\.poly\.js) "no-cache, no-store, no-transform"; + ~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts\/api\.js|static\/scripts\/sdk\/.*|static\/scripts\/api\.poly\.js) "no-cache, no-store, no-transform"; ~*\/(static\/images\/.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000"; } From cf0f3366a53c3b3185658a1f36dd933423ee0d37 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Thu, 11 Apr 2024 16:50:32 +0300 Subject: [PATCH 3/3] Config: Nginx: Fixed route for scripts --- config/nginx/onlyoffice.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/nginx/onlyoffice.conf b/config/nginx/onlyoffice.conf index 4308528093..2eea87e811 100644 --- a/config/nginx/onlyoffice.conf +++ b/config/nginx/onlyoffice.conf @@ -185,8 +185,8 @@ server { try_files /locales/$content/$basename /index.html =404; } - location ~* /static/scripts/ { - try_files /scripts/$basename /index.html =404; + location ~* /static/scripts/(.*)$ { + try_files /scripts/$1 /index.html =404; } location ~* /static/plugins/ {