cloudfront-auth icon indicating copy to clipboard operation
cloudfront-auth copied to clipboard

Pass through OPTIONS requests without oauth redirect

Open z0rc opened this issue 5 years ago • 1 comments

Deploying this function results in blocking any CORS request. Main issue here is that when browser issues preflight request via OPTIONS (https://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0 and https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) it doesn't include any cookies, that results in constant redirect to oauth provider, that cannot be completely resolved, because there are no cookies allowed.

Unfortunately CloudFront doesn't allow specifying that OPTIONS requests should be executed without triggering Lambda@Edge function. The only way to pass those requests is in function code only.

z0rc avatar Jun 20 '19 14:06 z0rc

Any feedback with this issue at all ? Now that CloudFront is triggering a preflight request (which it wasn't 6 months ago), this approach is no longer valid.

rustymcg9000 avatar Jul 18 '19 22:07 rustymcg9000