Comments (3)
curl that's working normally
curl -i -X GET http://localhost:8005/databases -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.e30.6y42esKnQjjLWRwENxx3lTm_ZYuOYrO6TBKFxEj6SHQ"
If I try a OPTIONS with one of my endpoints of custom querys I receive the follow message:
"error": "could not get script sum/sum, invalid http method OPTIONS"
Like if the OPTIONS was not configured, reforcing the bug report
from prest.
Shares the way you made the request (if possible using curl)
from prest.
So it appears that this is the problem: https://stackoverflow.com/questions/39066786/cors-prevent-preflight-of-request-with-authorization-header
Me and my team worked on a pre-response from nginx for OPTIONS request and the authentication worked, but I think the server should be able to deal with simple-requests even with authorization being passed (example: https://blog.morethancode.dev/killing-cors-preflight-requests-on-a-react-spa/) and to have a pre-response ready with headers and a 204 status to this kinda of method.
from prest.
Related Issues (20)
- Different JOIN behaviour after prest upgrade HOT 19
- Error in Template Functions HOT 6
- Redshift support is not working HOT 3
- update urfave/negroni to v3
- Add pagination object for every query and request HOT 3
- naked start HOT 4
- CDC ( change data capture )
- Performance Endpoints HOT 2
- Documentation quick start scaffold not working for me HOT 16
- Error Silencing on pREST HOT 1
- prest 1.2.1 release build was not done successfully HOT 4
- JWT Middleware accepts expired tokens HOT 1
- script in Custom Queries? HOT 4
- A Simpler Supabase-Type Front-End HOT 1
- roreleaser upload error HOT 1
- lint: error return value of `w.Write` is not checked (errcheck) HOT 1
- How to inserted into jsonb field? HOT 6
- Fix code scanning alert – Database query built from user-controlled sources
- Cancel display flags help on Pg error in "migrate" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prest.