Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: Preflight requests #312

Open
rowanstrydom opened this issue Jan 30, 2024 · 0 comments
Open

question: Preflight requests #312

rowanstrydom opened this issue Jan 30, 2024 · 0 comments
Assignees
Labels
need triage question Further information is requested

Comments

@rowanstrydom
Copy link

rowanstrydom commented Jan 30, 2024

A clear and concise description of what you want to accomplish.

I have a very basic caddy file setup which works perfectly. But when requesting a resource from my UI, preflight fails

{
  debug
  order authenticate before respond
  order authorize before basicauth
  security {
      authorization policy acl_policy {
        crypto key verify from env IMAGINARIO_AUTH_JWT_SIGNING_SECRETE
        crypto key token name jwt_access_token
        validate bearer header
        allow roles anonymous
        validate path acl
        disable auth redirect
    }
  }
}

:8080 {
  header {
      Access-Control-Allow-Origin *
      Access-Control-Allow-Methods "GET, OPTIONS"
      Access-Control-Allow-Headers "Authorization, Content-Type"
      Access-Control-Allow-Credentials true
  }
  root * {env.PERSISTENT_STORAGE_DIR}
  route /* {
    authorize with acl_policy
    file_server browse
	}
}

How can I return a 204 for any preflight requests?

Preflight requests

@rowanstrydom rowanstrydom added need triage question Further information is requested labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants