1
1
Files
zyxel-vmg8825_b50b-cfw/package/libs/clinkc/patches/121-ZYXEL_ENHANCE_CrossSiteDebug_YuruLi.patch
T
2026-04-17 18:33:03 +02:00

53 lines
1.9 KiB
Diff

Index: clinkc/include/cybergarage/http/chttp.h
===================================================================
--- clinkc.orig/include/cybergarage/http/chttp.h 2018-11-19 14:33:59.334336475 +0800
+++ clinkc/include/cybergarage/http/chttp.h 2018-11-19 14:42:17.102346023 +0800
@@ -363,6 +363,10 @@
extern BOOL bRemoveDaemonsWirelessModule;
+#ifdef ZYXEL_PATCH
+void enableCrossSiteDebug();
+#endif
+
/****************************************
* Function
****************************************/
Index: clinkc/src/cybergarage/http/chttp_packet.c
===================================================================
--- clinkc.orig/src/cybergarage/http/chttp_packet.c 2018-11-19 14:33:59.238336473 +0800
+++ clinkc/src/cybergarage/http/chttp_packet.c 2018-11-19 14:42:24.854973821 +0800
@@ -64,6 +64,13 @@
BOOL bRemoveDaemonsWirelessModule = FALSE;
+#ifdef ZYXEL_PATCH
+BOOL crossSiteDebug = false;
+
+void enableCrossSiteDebug(){
+ crossSiteDebug = true;
+}
+#endif
static int memory_check(int buflen, char *remoteIP);
/****************************************
@@ -346,11 +353,13 @@
cg_log_debug_l4("Entering...\n");
-#ifdef ZYXEL_CROSS_SITE_DEBUG
- cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Origin", "*");
- cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Methods", "*");
- //cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Headers", "*");
- //cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Credentials", "true");
+#ifdef ZYXEL_PATCH
+ if(crossSiteDebug){
+ cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Origin", "*");
+ cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Methods", "*");
+ //cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Headers", "*");
+ //cg_http_headerlist_set(httpPkt->headerList, "Access-Control-Allow-Credentials", "true");
+ }
#endif
/**** send headers ****/