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

Fix issue #26 #27

Merged
merged 1 commit into from
Jul 19, 2017
Merged

Fix issue #26 #27

merged 1 commit into from
Jul 19, 2017

Conversation

vaibhav92
Copy link

This small patch fixes the issue when the hastebin application is deployed to the non default path on the web-server.

Test with non default server

[me@localhost ]$ echo "hello" | HASTE_SERVER='http://my.webserver.com/paste' haste
http://me.mywebserver.com/paste/ohezuqeray

Test with default server

[me@localhost ]$ unset HASTE_SERVER
[me@localhost ]$ echo "hello" | haste
http://hastebin.com/esacamudap

@BurningSmile
Copy link

i'm doubtful this patch will ever be accepted but it would be amazing if this could get put into the haste client!

@seejohnrun seejohnrun merged commit 1f3318a into toptal:master Jul 19, 2017
@BurningSmile
Copy link

Well thanks! 👍

seejohnrun added a commit that referenced this pull request Jul 19, 2017
seejohnrun added a commit that referenced this pull request Jul 19, 2017
@seejohnrun
Copy link
Contributor

No problem - FYI for posterity:

  • Added tests in b5aa8fb
  • Released as part of 0.2.3

Thanks @vaibhav92 !

@BurningSmile
Copy link

BurningSmile commented Jul 19, 2017

Tested it and it's working. But in doing so I found a bug with haste-server. I'm running it under a sub dir with a nginx proxy as described in the documentation. It seems as though i had to apply the patch linked in the wiki to get pasting to work at all. [Otherwise I would get a "something went wrong error." and the url would redirect to the main domain name. so instead of "domainname.com/haste" it would go back to "domanname" but stay on the hastebin page.] After applying the patch from the documentation. I can now paste and save it properly, But when i then copy the link and attempt to view it on another tab it redirects to domainname/haste. Any ideas what would cause this behavior?

@seejohnrun
Copy link
Contributor

Yeah unfortunately haste-server doesn't support that yet. cc: toptal/haste-server#140

@BurningSmile
Copy link

oh okay, so for now the only way to get it to work is a subdomain? I see that when I paste it makes the file then trying to access it it gives the error "warn: document not found key=undefined."

Thanks for the project your provide, its been great for work!

@seejohnrun
Copy link
Contributor

That's right. I'm glad you like the project - and I'll keep the feature in mind when I/if have time!

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

Successfully merging this pull request may close these issues.

3 participants