Hi,
I’m currently developing client(ReactJs) server(Java) web application.
I’m trying to configure my back-end to work with method type ‘OPTIONS’ with no success.
How can it be done?
Thanks,
Yaniv.
Hi,
I’m currently developing client(ReactJs) server(Java) web application.
I’m trying to configure my back-end to work with method type ‘OPTIONS’ with no success.
How can it be done?
Thanks,
Yaniv.
Hi,
Thanks for the quick response.
yes, I saw the example.
The ‘Options’ request defined in a specific service impl, but lagom’s gateway blocks the request before it reaches the service api.
Try two things:
withAutoAcl(true)
in the service api and see it that enables you to make CORS requests through the gateway.Hi,
I found the problem, in the application.conf I changed pathPrefixes = [“/api”] to pathPrefixes = [“/”] and
in my service impl I added withServiceAcls(
ServiceAcl.methodAndPath(Method.OPTIONS, “/.*”)
with general path prefix and now it works.
Thank you,
Yaniv.