Comments (9)
CORS now available via 22c2c4f (Release v1.0.0)
from prosody-filer.
CORS headers not recognized by https://compliance.conversations.im/ because of https://github.com/iNPUTmice/caas/issues/43
from prosody-filer.
CORS works, proven by https://compliance.conversations.im/server/anoxinon.me/
from prosody-filer.
CORS headers work on https://compliance.conversations.im/
from prosody-filer.
Is there anything that needs to be enable in nginx ?
I am asking because here is what I get from conversesj:
Access to XMLHttpRequest at 'https://myserver.com/upload/665b1e62-b8b17f-94c5fe25bd38/file.pdf?v=afa2e83efbb49cb5ca311c2a11c91d3338b3e6e34e32a528552' from origin 'https://www.myserver.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
from prosody-filer.
@meaz I'm having the same issue with my own Converse.js instance at the moment. Maybe I have some free time on the upcoming days to investigate this issue and suggest a solution. Either in the Nginx side or the Prosody Filer side.
from prosody-filer.
OPTIONS request is now supported via new Nginx config:
[...]
location /upload/ {
if ( $request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin '*';
add_header Access-Control-Allow-Methods 'PUT, GET, OPTIONS, HEAD';
add_header Access-Control-Allow-Headers 'Authorization, Content-Type';
add_header Access-Control-Allow-Credentials 'true';
add_header Content-Length 0;
add_header Content-Type text/plain;
return 200;
}
proxy_pass http://127.0.0.1:5050/upload/;
proxy_request_buffering off;
}
[...]
(also see README.md in master branch)
from prosody-filer.
Thanks a lot @ThomasLeister
There is small error on the Readme:
location /upload/ {
location /upload/ {
should just be:
location /upload/ {
from prosody-filer.
Thank you, I just fixed it :-)
from prosody-filer.
Related Issues (20)
- Investigate MAC generation / comparison HOT 2
- Version v1.0.0 response invalid mac HOT 10
- Error with Group=nginx HOT 1
- Not clearing old photos ever, and an index is available (not even obscurity) HOT 3
- Verifying sources and/or binaries HOT 3
- Invalid MAC HOT 2
- Prosody updated info HOT 5
- Running bin file HOT 1
- Project seems out of date HOT 4
- Please implement v2 protocol HOT 1
- Go get command is depreciated HOT 1
- SomeThing wrong with HMAC HOT 3
- create a new release HOT 3
- H2Direct not recognized HOT 1
- Files upload in folder HOT 1
- File size limit HOT 1
- Automatic purge HOT 1
- Automatic purge : remove message HOT 1
- Advantage of files served by nginx directly HOT 5
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 prosody-filer.