diff --git a/config/appsettings.json b/config/appsettings.json index a5d3ab18119..e883b17b395 100644 --- a/config/appsettings.json +++ b/config/appsettings.json @@ -575,5 +575,16 @@ "region": "us-east-1", "tableName": "" } + }, + "webhooks": { + "blacklist": [ + "0.0.0.0/8", + "10.0.0.0/8", + "100.64.0.0/10", + "127.0.0.0/8", + "169.254.0.0/16", + "172.16.0.0/12", + "192.168.0.0/16" + ] } } diff --git a/install/common/product-configuration b/install/common/product-configuration index 0130237cef3..4bf18f7154f 100644 --- a/install/common/product-configuration +++ b/install/common/product-configuration @@ -647,30 +647,25 @@ change_elasticsearch_config(){ sed -i "s/ingest.geoip.downloader.enabled.*/ingest.geoip.downloader.enabled: false/" ${ELASTIC_SEARCH_CONF_PATH} fi - ELASTIC_SYSTEMD_DIR="${SYSTEMD_DIR}/elasticsearch.service.d" - mkdir -p "${ELASTIC_SYSTEMD_DIR}" - - if [ ! -e "${ELASTIC_SYSTEMD_DIR}/overwrite.conf" ]; then - echo "[Service]" > "${ELASTIC_SYSTEMD_DIR}/overwrite.conf" - echo "TimeoutStartSec=600" >> "${ELASTIC_SYSTEMD_DIR}/overwrite.conf" - systemctl daemon-reload >/dev/null 2>&1 - fi - local TOTAL_MEMORY=$(free -m | grep -oP '\d+' | head -n 1); local MEMORY_REQUIREMENTS=12228; #RAM ~4*3Gb if [ ${TOTAL_MEMORY} -gt ${MEMORY_REQUIREMENTS} ]; then - if ! grep -q "[-]Xms1g" ${ELASTIC_SEARCH_JAVA_CONF_PATH}; then - echo "-Xms4g" >> ${ELASTIC_SEARCH_JAVA_CONF_PATH} - else - sed -i "s/-Xms1g/-Xms4g/" ${ELASTIC_SEARCH_JAVA_CONF_PATH} - fi + ELASTICSEATCH_MEMORY="4g" + else + ELASTICSEATCH_MEMORY="1g" + fi - if ! grep -q "[-]Xmx1g" ${ELASTIC_SEARCH_JAVA_CONF_PATH}; then - echo "-Xmx4g" >> ${ELASTIC_SEARCH_JAVA_CONF_PATH} - else - sed -i "s/-Xmx1g/-Xmx4g/" ${ELASTIC_SEARCH_JAVA_CONF_PATH} - fi + if grep -qE "^[^#]*-Xms[0-9]g" "${ELASTIC_SEARCH_JAVA_CONF_PATH}"; then + sed -i "s/-Xms[0-9]g/-Xms${ELASTICSEATCH_MEMORY}/" "${ELASTIC_SEARCH_JAVA_CONF_PATH}" + else + echo "-Xms${ELASTICSEATCH_MEMORY}" >> "${ELASTIC_SEARCH_JAVA_CONF_PATH}" + fi + + if grep -qE "^[^#]*-Xmx[0-9]g" "${ELASTIC_SEARCH_JAVA_CONF_PATH}"; then + sed -i "s/-Xmx[0-9]g/-Xmx${ELASTICSEATCH_MEMORY}/" "${ELASTIC_SEARCH_JAVA_CONF_PATH}" + else + echo "-Xmx${ELASTICSEATCH_MEMORY}" >> "${ELASTIC_SEARCH_JAVA_CONF_PATH}" fi if [ -d /etc/elasticsearch/ ]; then diff --git a/run/WebStudio.bat b/run/WebStudio.bat index ccc72959e96..43b5e8dc411 100644 --- a/run/WebStudio.bat +++ b/run/WebStudio.bat @@ -1,4 +1,4 @@ @echo off PUSHD %~dp0..\.. -set servicepath=%cd%\server\web\ASC.Web.Studio\bin\Debug\ASC.Web.Studio.exe urls=http://0.0.0.0:5003 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=web.studio pathToConf=%cd%\buildtools\config core:products:folder=%cd%\server\products \ No newline at end of file +set servicepath=%cd%\server\web\ASC.Web.Studio\bin\Debug\ASC.Web.Studio.exe urls=http://0.0.0.0:5003 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=web.studio pathToConf=%cd%\buildtools\config core:products:folder=%cd%\server\products core:eventBus:subscriptionClientName=asc_event_bus_webstudio_queue \ No newline at end of file