Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tus js client dosnt follow endpoint host port and use default port #85

Closed
mhf-ir opened this issue Nov 25, 2017 · 3 comments
Closed

Tus js client dosnt follow endpoint host port and use default port #85

mhf-ir opened this issue Nov 25, 2017 · 3 comments

Comments

@mhf-ir
Copy link

mhf-ir commented Nov 25, 2017

I use my endpoint to special port for testing mode. https://example.tld:3434/app/upload
Process start on this HTTP methods after first POST method OPTIONS WILL SEND on default port for host not the given endpoint.

Request URL:https://example.tld:3434/app/upload
Request Method:POST

Request URL:https://example.tld/app/upload/c9930f642a549a0dd4380129a49cada2
Request Method:OPTIONS

Request URL:https://example.tld/app/upload/c9930f642a549a0dd4380129a49cada2
Request Method:PATCH
@mhf-ir mhf-ir changed the title Tus js client dosnt send HEAD and OPTIONS to valid host port Tus js client dosnt follow host port and use default port Nov 25, 2017
@mhf-ir mhf-ir changed the title Tus js client dosnt follow host port and use default port Tus js client dosnt follow endpoint host port and use default port Nov 25, 2017
@Acconut
Copy link
Member

Acconut commented Nov 25, 2017

This is likely not a problem with tus-js-client but instead I believe the server is not properly configured, which causes it to respond with the https://example.tld/app/upload/c9930f642a549a0dd4380129a49cada2 URL after the POST request.

What tus server are you using? Are you using a proxy in front of it? If you are using tusd, did you follow these instructions: https://github.com/tus/tusd#can-i-run-tusd-behind-a-reverse-proxy?

@mhf-ir mhf-ir closed this as completed Nov 28, 2017
@mhf-ir
Copy link
Author

mhf-ir commented Dec 8, 2017

I use nodejs version seems be there is no options behinde proxy. i set this nginx proxy configuration that other nginx serve nodejs tus server:

location /sampleproxypath {
  rewrite ^/sampleproxypath$ /sampleproxypath/ permanent;
  rewrite ^/sampleproxypath(.*) $1 break;
  proxy_ssl_verify off;
  proxy_pass https://127.0.0.1:443;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Host $host;
  proxy_set_header X-Forwarded-Port $server_port;
  proxy_set_header X-Forwarded-Base-Path '/sampleproxypath';
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
}

@Acconut

@Acconut
Copy link
Member

Acconut commented Dec 9, 2017

Unfortunately, I do not have much experience with the tus-node-server. Would you mind opening an issue at its repository where you can most likely get better help: https://github.com/tus/tus-node-server/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants