flowjs / flow-php-server

flow.js php server library, validates uploaded chunks and safely merges all chunks to a single file
http://flowjs.github.io/ng-flow/
MIT License
245 stars 42 forks source link

Server just returning 302 Found when uploading from cross-server #40

Open Zxurian opened 6 years ago

Zxurian commented 6 years ago

I have two servers setup, A & B, with urls A & B pointing to the servers respectively. Both servers contain the same codebase.

If I go directly to url B on server B, and initiate a flowjs upload, everything works as expected. If I go to url A (server A), but have the target url for the flowjs be url B (server B), instead of uploading the file, I just got three requests with an empty response but a 302 Found Header.

Any insight on getting this working cross-server without me digging into the codebase?

All SSL's are wildcard, and sessions are cross-domain to a redis server.

AidasK commented 6 years ago

Are you redirecting to different domain/subdomain? Have you checked CORS? How about "Access-Control-Allow-Origin: *"?

Zxurian commented 6 years ago

Yes, I am redirecting to a different subdomain. I have the following headers set on both server A & B

Access-Control-Allow-Headers | Authorization, Origin, X-Reque…ed-With, Content-Type, Accept
Access-Control-Allow-Methods | GET, POST, OPTIONS
Access-Control-Allow-Origin | url A

It could be a CORS issue since I am just experimenting with it. When the initial flow AJAX request is made, it' issuing an OPTIONS request, instead of the normal POST request when it's on the same server, and a 302 Found is responding.

mitmelon commented 1 year ago

Yes, I am redirecting to a different subdomain. I have the following headers set on both server A & B

Access-Control-Allow-Headers | Authorization, Origin, X-Reque…ed-With, Content-Type, Accept
Access-Control-Allow-Methods | GET, POST, OPTIONS
Access-Control-Allow-Origin | url A

It could be a CORS issue since I am just experimenting with it. When the initial flow AJAX request is made, it' issuing an OPTIONS request, instead of the normal POST request when it's on the same server, and a 302 Found is responding.

Did you later found a solution to this because am also facing same issues