You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Vic Cekvenich <ce...@gmail.com> on 2019/08/27 00:31:21 UTC

CORS in Core v5 beta

Hi,
3 questions:
How do I do: request.get('origin')?

Also is this best way to set CORS?
response.setHeader('Access-Control-Allow-Origin', origin)

And I assume set status 403 if I want to reject.

I know it is not a good example, but I do want to get the origin of the user.
And then do some computing and figure if I should allow the origin.
So I just want to know the right way to use the api.
Cheers, Vic
ps: ftw my code is here:
https://github.com/intuition-dev/intu-diversity/blob/master/java-workspace/java-srv-http-rpc%2B/src/org/hrp/http/HSrvHandler.java

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org