Gemeente-DenHaag / mijngemeente-gateway

Public proxy gateway for the OpenZaak API.
Other
1 stars 0 forks source link

Support CORS #38

Open bddjong opened 3 years ago

bddjong commented 3 years ago

The gateway should allow CORS requests so that the PWA can use it

We should investigate how to properly support CORS on the gateway. This is currently allowed through a quick fix using cors middleware.

Tasks

GewoonMaarten commented 3 years ago

This is a temporary work around:

ogjtech commented 3 years ago

This is a temporary work around:

@GewoonMaarten according to this website, your temporary work around is the way to fix this in general. You can specify which specific URL has access to the gateway's resources, or use the wildcard '*' as per your example to allow anyone anywhere (a bad idea if you ask me, perhaps time to decide on a URL for the PWA).

@Gemeente-DenHaag/mdh-rysst Express' website itself documents the similar way and even more on configuring CORS here.