Search found 3 matches

by dgregory46
Wed Dec 07, 2022 6:50 pm
Forum: YAJL-ILE
Topic: How to set response headers
Replies: 6
Views: 1736

Re: How to set response headers

I'm still stumped. My rpg program is writing out: Content-type: application/json Access-Control-Allow-Origin: * { "ping": "ping" } When I request it from the browser, I get a 500 error with the message: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the re...
by dgregory46
Thu Dec 01, 2022 11:04 pm
Forum: YAJL-ILE
Topic: How to set response headers
Replies: 6
Views: 1736

Re: How to set response headers

Thanks for your reply Scott. The yajl_copyBufStr() technique is the one I finally settled on. It seems to be working fine from the RPG side, but for some reason the browser is not recognizing my 'Access-Control-Allow-Origin: *' header. I have checked to make sure there is a blank line after my last ...
by dgregory46
Wed Nov 30, 2022 1:11 am
Forum: YAJL-ILE
Topic: How to set response headers
Replies: 6
Views: 1736

How to set response headers

I am developing a YAJL driven web service that will produce JSON data to a web application. I'm getting cross-origin errors and would like to return a header that allows access. I have not been able to find any documentation on how to do this. It looks like yajl_writeStdout() automatically includes ...