Code Monkey home page Code Monkey logo

Comments (8)

masterzen avatar masterzen commented on September 17, 2024

Can you attach (or send me privately by e-mail) the full debug log (you'll need to compile nginx with --with-debug)?
I think "more_set_headers" phase happens after the upload is registered in the upload progress module, which I'm afraid can't be fixed easily, but I'd like to check first with the log.

from nginx-upload-progress-module.

lexer avatar lexer commented on September 17, 2024

I've mailed it to you.

from nginx-upload-progress-module.

lexer avatar lexer commented on September 17, 2024

I also checked debug log and as you suggest get_tracking_id is called earlier then headers are set.

How can I fix it?

from nginx-upload-progress-module.

lexer avatar lexer commented on September 17, 2024

I also checked debug log and as you suggest get_tracking_id is called earlier then headers are set.

How can I fix it?

from nginx-upload-progress-module.

masterzen avatar masterzen commented on September 17, 2024

Hmm, reading more headers documentation, it looks like "more_set_headers" sets output headers (the one that will be returned to the client).
Can you try with "more_set_input_header" instead?

from nginx-upload-progress-module.

lexer avatar lexer commented on September 17, 2024

Yep, that solve half of problem. But first call get_tracking_id is performed earlier then setting of headers.

In our application we need to proxy traffic to Amazon that reject requests with querystring.

So currently we have solve problem in following way. We receive querystring param. Set header using querystring value and then remove querystring with rewriting.

location /upload {      

    if ($request_uri ~* "^/upload\?X-Progress-ID=(.*)$") {
        set $progress_id $1;
        more_set_input_headers "X-Progress-ID: $progress_id";       
    }

    set $args "";
    rewrite ^(.*)$ / break; 

    proxy_pass http://myamazonbucket.s3.amazonaws.com/;             
    #proxy_redirect default;        
    track_uploads proxied 30s;
}

from nginx-upload-progress-module.

masterzen avatar masterzen commented on September 17, 2024

Do you mean the problem is solved by the rewrite break?

from nginx-upload-progress-module.

lexer avatar lexer commented on September 17, 2024

Rewrite required to remove "/upload". set $args "" removes "X-Progress-ID" from querystring.

from nginx-upload-progress-module.

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.