@@ -43,7 +43,8 @@ int main(int, char const**) {
43
43
44
44
api_find_transactions_by_tag (&service, req.params [" tag" ].c_str (),
45
45
&json_result);
46
- res.set_header (" content-type" , " application/json" );
46
+ res.set_header (" Content-Type" , " application/json" );
47
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
47
48
res << json_result;
48
49
});
49
50
@@ -64,7 +65,8 @@ int main(int, char const**) {
64
65
65
66
api_get_transaction_object (&service, req.params [" tx" ].c_str (),
66
67
&json_result);
67
- res.set_header (" content-type" , " application/json" );
68
+ res.set_header (" Content-Type" , " application/json" );
69
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
68
70
res << json_result;
69
71
});
70
72
@@ -85,7 +87,8 @@ int main(int, char const**) {
85
87
86
88
api_find_transactions_obj_by_tag (&service, req.params [" tag" ].c_str (),
87
89
&json_result);
88
- res.set_header (" content-type" , " application/json" );
90
+ res.set_header (" Content-Type" , " application/json" );
91
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
89
92
res << json_result;
90
93
});
91
94
@@ -103,7 +106,8 @@ int main(int, char const**) {
103
106
char * json_result;
104
107
105
108
api_get_tips_pair (&service, &json_result);
106
- res.set_header (" content-type" , " application/json" );
109
+ res.set_header (" Content-Type" , " application/json" );
110
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
107
111
res << json_result;
108
112
});
109
113
@@ -121,7 +125,8 @@ int main(int, char const**) {
121
125
char * json_result;
122
126
123
127
api_get_tips (&service, &json_result);
124
- res.set_header (" content-type" , " application/json" );
128
+ res.set_header (" Content-Type" , " application/json" );
129
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
125
130
res << json_result;
126
131
});
127
132
@@ -139,7 +144,8 @@ int main(int, char const**) {
139
144
char * json_result;
140
145
141
146
api_generate_address (&service, &json_result);
142
- res.set_header (" content-type" , " application/json" );
147
+ res.set_header (" Content-Type" , " application/json" );
148
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
143
149
res << json_result;
144
150
});
145
151
@@ -169,7 +175,8 @@ int main(int, char const**) {
169
175
api_send_transfer (&service, req.body ().c_str (), &json_result);
170
176
}
171
177
172
- res.set_header (" content-type" , " application/json" );
178
+ res.set_header (" Content-Type" , " application/json" );
179
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
173
180
res << json_result;
174
181
});
175
182
@@ -190,7 +197,8 @@ int main(int, char const**) {
190
197
const char * json = cJSON_PrintUnformatted (json_obj);
191
198
192
199
res.set_status (SC_BAD_REQUEST);
193
- res.set_header (" content-type" , " application/json" );
200
+ res.set_header (" Content-Type" , " application/json" );
201
+ res.set_header (" Access-Control-Allow-Origin" , " *" );
194
202
res << json;
195
203
196
204
cJSON_Delete (json_obj);
0 commit comments