Is there a way to configure a Wisp server to properly handle the XXXX scenario?
you actually mean, "Is there a CORS plugin / webmod for Wisp?" then no.
I did think about writing one once, but CORS is really just a lot of configuration, setting a few HTTP headers, and very little logic. To then make a plugin that's configurable enough for all use cases, I quickly realised that managing the plugin config would probably be more complicated to the end developer than setting the headers themselves!
But if you have concrete ideas to the contrary, it'd be good to hear them.
jhughesTue 22 May 2018
I was specifically hitting a CORS issue with this and setting the header didn't seem to matter. The request was coming via a proxy so i'm not sure if the issue was actually with the proxy or not. At this point I have changed so much in my server's architecture for this scenario I can't even recreate the issue anymore so it's hard for me to give much more feedback on the topic until I come across it again.
jhughes Mon 21 May 2018
Is there a way to configure a Wisp server to properly handle the
Access-Control-Allow-Origin
scenario?SlimerDude Mon 21 May 2018
Of course, just set the
WebRes
header value to whatever you need:But if by the highlighted words:
you actually mean, "Is there a CORS plugin / webmod for Wisp?" then no.
I did think about writing one once, but CORS is really just a lot of configuration, setting a few HTTP headers, and very little logic. To then make a plugin that's configurable enough for all use cases, I quickly realised that managing the plugin config would probably be more complicated to the end developer than setting the headers themselves!
But if you have concrete ideas to the contrary, it'd be good to hear them.
jhughes Tue 22 May 2018
I was specifically hitting a CORS issue with this and setting the header didn't seem to matter. The request was coming via a proxy so i'm not sure if the issue was actually with the proxy or not. At this point I have changed so much in my server's architecture for this scenario I can't even recreate the issue anymore so it's hard for me to give much more feedback on the topic until I come across it again.