Giter VIP home page Giter VIP logo

Comments (9)

ThomasLeister avatar ThomasLeister commented on June 1, 2024

CORS now available via 22c2c4f (Release v1.0.0)

from prosody-filer.

ThomasLeister avatar ThomasLeister commented on June 1, 2024

CORS headers not recognized by https://compliance.conversations.im/ because of https://github.com/iNPUTmice/caas/issues/43

from prosody-filer.

ThomasLeister avatar ThomasLeister commented on June 1, 2024

CORS works, proven by https://compliance.conversations.im/server/anoxinon.me/

from prosody-filer.

ThomasLeister avatar ThomasLeister commented on June 1, 2024

CORS headers work on https://compliance.conversations.im/ ✔️

from prosody-filer.

meaz avatar meaz commented on June 1, 2024

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.

ThomasLeister avatar ThomasLeister commented on June 1, 2024

@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.

ThomasLeister avatar ThomasLeister commented on June 1, 2024

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.

meaz avatar meaz commented on June 1, 2024

Thanks a lot @ThomasLeister

There is small error on the Readme:

location /upload/ {
        location /upload/ {

should just be:
location /upload/ {

from prosody-filer.

ThomasLeister avatar ThomasLeister commented on June 1, 2024

Thank you, I just fixed it :-)

from prosody-filer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.