Page 1 of 1

Spiffy and CORS

Posted: Fri Aug 31, 2018 3:44 am
by Baudchaser
Hello fine ladies and gentlemen.

I'm fairly new to Scheme, and I've landed in a situation where I need to connect a web app to a REST interface made in Scheme/Chicken with Spiffy webserver.

After dabbling around with the Spiffy config, I just can't seem to wrap my head around how to add the necessary header output. In Apache and NGinX it seems fairly straight forward... Access-Control-Allow-Origin: <origin>[, <origin>]* | *

But adding this the right way to the .SCM file for starting Spiffy (i.e. CSI -s /www/config.scm) isn't quite as easy as I hoped it would be.

Does anybody have a good idea how to solve this, by example or a good and easily understandable set of documentation (even for a Scheme beginner as myself?)

Best regards