Comments (3)
Looking into the code, it appears that Jarvis doesn't actually support any CORS handling for a JSON service, meaning that the service is inaccessible for a wide range of applications. I think it would be good to have CORS handling built-in.
from jarvis.
The current code in HandleRequest
might be able to be retrofitted to rely on the application provided Validate
function to handle the request. The only issue is that there is no way to signal to the system that the Validate has in fact Validated and completed the response. It's only a pass/fail.
We could split into a pass / response / fail mode, or we could leave the Validate function as a pass/fail and then have another function that handles CORS.
At the moment I'm inclined to just use the pass / response / fail model. I suggest that the return code will indicate this. If it is 0, then it is a passthrough. If it's positive, it's a fail and should follow the normal fail path. If it's a -1, then it should immediately send the response that was crafted by the validate function.
from jarvis.
c294037 adds support for CORS by default for JSON servers now.
from jarvis.
Related Issues (20)
- Consider making IncludeFns and ExcludeFns properties rather than fields HOT 1
- Web interface fails if exposed functions contain β
- Allow .apla (APL array) files to be loaded
- EndPoints needs to be βML/βIO insensitive
- Don't close connection for in-process request
- Add MaxPayloadSize setting
- Return 431 status when headers are too large HOT 1
- Any chance of supporting GZip, deflate please. HOT 1
- Bug in running secure server
- Implement better handling in event where user fails the request
- Update Workspaces for Dyalog 17.0 Compatibility
- Add support for Swagger UI HOT 2
- Provide setting to kill request-handling thread on connection close
- Simpler `sint` HOT 1
- Seemingly random crashes related to "OSError" "Undefined name: CON000000XX" HOT 6
- All but GET method seem to need a none empty body HOT 3
- Update Jarvis container to run under v19 HOT 2
- Incorrect Conga Version Reported On Starting Server
- Pipelining Causes Server Error HOT 3
- Jarvis Test Suite 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 jarvis.