I’m working on a Web API and the gentleman on the other end is asking me if I can integrate an ACAO header.
I get the concept, but I wonder if it is possible to implement with the webserverDAT.
Would it be possible with a custom index page integrating the ACAO header.
I believe something like that . I have limited knowledge in all those Web things .
I have dealt with APIs and sending requests on the client side, but this time, I need to run the server.
This is for a CMS solution to get the playback commands.
So far, it works great.
I receive the request, execute the command, and send back the response with the statusCode and the data.
they asked me if I Could add an access-control-allow-origin header to the response.
I thought that I could handle it with an index where I could include the CORS header. But it is not as easy.
If I’ve understood correctly, without this, they have to go through a proxy.
I think that this feature must to be handled on the server side, so POCO in our case .
I’m glad they’ll be able to do without it. I already have a really tight deadline
@snaut is correct. To add an element to the responseHeader, you simply need to to add it to the responseDict, (which I find kinda odd choise, but whatever.)
If you want to dig a little I made a wrapper around the webServerDAT to make live a little bit easier:
Hi
thanks for the solution, really helpful for an HTML noob like me.
And far easier than what I thought. @alphamoonbase , I recently found your 2 components. I need to explore them to understand the concept.