Browse Source

Merge branch 'dev' into webui

rfm69
Xose Pérez 6 years ago
parent
commit
fc662f1a58
2 changed files with 26 additions and 18 deletions
  1. +9
    -1
      code/espurna/web.ino
  2. +17
    -17
      code/platformio.ini

+ 9
- 1
code/espurna/web.ino View File

@ -60,7 +60,9 @@ void _onGetConfig(AsyncWebServerRequest *request) {
char buffer[100]; char buffer[100];
snprintf_P(buffer, sizeof(buffer), PSTR("attachment; filename=\"%s-backup.json\""), (char *) getSetting("hostname").c_str()); snprintf_P(buffer, sizeof(buffer), PSTR("attachment; filename=\"%s-backup.json\""), (char *) getSetting("hostname").c_str());
response->addHeader("Content-Disposition", buffer); response->addHeader("Content-Disposition", buffer);
response->addHeader("X-XSS-Protection", "1; mode=block");
response->addHeader("X-Content-Type-Options", "nosniff");
response->addHeader("X-Frame-Options", "deny");
request->send(response); request->send(response);
} }
@ -158,6 +160,9 @@ void _onHome(AsyncWebServerRequest *request) {
response->addHeader("Content-Encoding", "gzip"); response->addHeader("Content-Encoding", "gzip");
response->addHeader("Last-Modified", _last_modified); response->addHeader("Last-Modified", _last_modified);
response->addHeader("X-XSS-Protection", "1; mode=block");
response->addHeader("X-Content-Type-Options", "nosniff");
response->addHeader("X-Frame-Options", "deny");
request->send(response); request->send(response);
} }
@ -232,6 +237,9 @@ void _onUpgrade(AsyncWebServerRequest *request) {
AsyncWebServerResponse *response = request->beginResponse(200, "text/plain", buffer); AsyncWebServerResponse *response = request->beginResponse(200, "text/plain", buffer);
response->addHeader("Connection", "close"); response->addHeader("Connection", "close");
response->addHeader("X-XSS-Protection", "1; mode=block");
response->addHeader("X-Content-Type-Options", "nosniff");
response->addHeader("X-Frame-Options", "deny");
if (Update.hasError()) { if (Update.hasError()) {
eepromRotate(true); eepromRotate(true);
} else { } else {


+ 17
- 17
code/platformio.ini View File

@ -1173,7 +1173,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H801
build_flags = ${common.build_flags_1m0m} -DHUACANXING_H801
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = light modules = light
@ -1185,7 +1185,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H801
build_flags = ${common.build_flags_1m0m} -DHUACANXING_H801
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -1200,7 +1200,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H802
build_flags = ${common.build_flags_1m0m} -DHUACANXING_H802
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = light modules = light
@ -1212,7 +1212,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H802
build_flags = ${common.build_flags_1m0m} -DHUACANXING_H802
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -1227,7 +1227,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC01
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC01
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = light modules = light
@ -1239,7 +1239,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC01
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC01
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -1254,7 +1254,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC02
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC02
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = light modules = light
@ -1266,7 +1266,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC02
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC02
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -1281,7 +1281,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC06
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC06
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = light modules = light
@ -1293,7 +1293,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC06
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC06
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -1308,7 +1308,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC11
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC11
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = light modules = light
@ -1320,7 +1320,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC11
build_flags = ${common.build_flags_1m0m} -DARILUX_AL_LC11
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -1335,7 +1335,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_E27
build_flags = ${common.build_flags_1m0m} -DARILUX_E27
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
@ -1346,7 +1346,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_E27
build_flags = ${common.build_flags_1m0m} -DARILUX_E27
upload_speed = 115200 upload_speed = 115200
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags} upload_flags = ${common.upload_flags}
@ -2276,7 +2276,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DPILOTAK_ESP_DIN_V1
build_flags = ${common.build_flags_1m0m} -DPILOTAK_ESP_DIN_V1
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
modules = sensor modules = sensor
@ -2288,7 +2288,7 @@ board = esp01_1m
board_build.flash_mode = dout board_build.flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DPILOTAK_ESP_DIN_V1
build_flags = ${common.build_flags_1m0m} -DPILOTAK_ESP_DIN_V1
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.ESPURNA_IP}" upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
@ -2301,7 +2301,7 @@ framework = arduino
board = nodemcu board = nodemcu
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DNODEMCU_BASIC -DNOWSAUTH -DGEIGER_SUPPORT=1 -DEVENTS_SUPPORT=0 -DINFLUXDB_SUPPORT=1 -DALEXA_SUPPORT=0 -DALEXA_ENABLED=0
build_flags = ${common.build_flags_1m0m} -DNODEMCU_BASIC -DNOWSAUTH -DGEIGER_SUPPORT=1 -DEVENTS_SUPPORT=0 -DINFLUXDB_SUPPORT=1 -DALEXA_SUPPORT=0 -DALEXA_ENABLED=0
upload_speed = 460800 upload_speed = 460800
monitor_speed = 115200 monitor_speed = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}


Loading…
Cancel
Save