From 1bab072a262951a9e3de44ec5068479ba2fba21f Mon Sep 17 00:00:00 2001
From: Roman Azarenko <roman.azarenko@iopsys.eu>
Date: Thu, 1 Dec 2022 10:22:52 +0100
Subject: [PATCH] Revert "sulu: 1.3.11"

This reverts commit a1cc37d3a672531b0e0e970b59e0b8791bd926b0.
---
 sulu-builder/Makefile                         | 2 +-
 sulu-builder/files/etc/nginx/conf.d/sulu.conf | 8 +++-----
 sulu/Makefile                                 | 2 +-
 sulu/files/etc/nginx/conf.d/sulu.conf         | 8 +++-----
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/sulu-builder/Makefile b/sulu-builder/Makefile
index c90b0bcf6..dd3b3343d 100644
--- a/sulu-builder/Makefile
+++ b/sulu-builder/Makefile
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sulu-builder
-PKG_VERSION:=1.3.11
+PKG_VERSION:=1.3.10
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-builder.git
diff --git a/sulu-builder/files/etc/nginx/conf.d/sulu.conf b/sulu-builder/files/etc/nginx/conf.d/sulu.conf
index 3d65b3cbd..025139c8b 100644
--- a/sulu-builder/files/etc/nginx/conf.d/sulu.conf
+++ b/sulu-builder/files/etc/nginx/conf.d/sulu.conf
@@ -5,13 +5,12 @@ server {
         root /sulu;
         location /config/ {
                 autoindex on;
-                expires -1;
 
                 if ($request_method = 'OPTIONS') {
                         add_header 'Access-Control-Allow-Origin' '*';
                         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
-                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,Content-Type,Range';
-                        add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
+                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
+                        add_header 'Access-Control-Max-Age' 1728000;
                         add_header 'Content-Type' 'text/plain; charset=utf-8';
                         add_header 'Content-Length' 0;
                         return 204;
@@ -19,9 +18,8 @@ server {
                 if ($request_method = 'GET') {
                         add_header 'Access-Control-Allow-Origin' '*' always;
                         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
-                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,Content-Type,Range' always;
+                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
                         add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
-                        add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
                 }
         }
 }
diff --git a/sulu/Makefile b/sulu/Makefile
index eb9dc6600..dff40ae6f 100644
--- a/sulu/Makefile
+++ b/sulu/Makefile
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sulu
-PKG_VERSION:=1.3.11
+PKG_VERSION:=1.3.10
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
diff --git a/sulu/files/etc/nginx/conf.d/sulu.conf b/sulu/files/etc/nginx/conf.d/sulu.conf
index 3d65b3cbd..025139c8b 100644
--- a/sulu/files/etc/nginx/conf.d/sulu.conf
+++ b/sulu/files/etc/nginx/conf.d/sulu.conf
@@ -5,13 +5,12 @@ server {
         root /sulu;
         location /config/ {
                 autoindex on;
-                expires -1;
 
                 if ($request_method = 'OPTIONS') {
                         add_header 'Access-Control-Allow-Origin' '*';
                         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
-                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,Content-Type,Range';
-                        add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
+                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
+                        add_header 'Access-Control-Max-Age' 1728000;
                         add_header 'Content-Type' 'text/plain; charset=utf-8';
                         add_header 'Content-Length' 0;
                         return 204;
@@ -19,9 +18,8 @@ server {
                 if ($request_method = 'GET') {
                         add_header 'Access-Control-Allow-Origin' '*' always;
                         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
-                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,Content-Type,Range' always;
+                        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
                         add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
-                        add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
                 }
         }
 }
-- 
GitLab