fosrl / fosrl/pangolin

CORS Pre-flight fails for public resources

Open
#2,369 5 comments 3 reactions 1 assignee Claimed by @miloschwartz View on GitHub
bug Improvement
Dominant language
TypeScript
Stars
22.8k
Forks
783
Avg merge
1d 11h
Merged PRs (30d)
47

Description

### Describe the Bug

If authorization is enabled on a public resource, the CORS pre-flight request will fail. CORS pre-flight normally doesn't allow extra headers so authentication may fail on the OPTIONS request. There also doesn't seem to be a mechanism to allow the preflight request to bypass auth (e.g. custom rule, CORS settings etc.).

### Environment

- OS Type & Version: Ubuntu 22.04
- Pangolin Version: 1.15.1
- Gerbil Version: 1.3.0
- Traefik Version: v3.6
- Newt Version: v1.9.0

### To Reproduce

- Start basic API node server
- Add a resource with SSO enabled
- Create a share link to create an auth token
- Make CORS preflight request

### Expected Behavior

Preflight requests are allow to pass auth.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.