sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.88k stars 136 forks source link

pdf files return 404 #257

Closed tomkp closed 7 years ago

tomkp commented 7 years ago

All pdf files uploaded with surge are returning 404 errors.

I've uploaded a pdf, txt and a docx file to the following domain:

http://smoggy-knife.surge.sh/

The txt and docx are fine, but the pdf gives me a 404.

sintaxi commented 7 years ago

We recently had an astronomical amount of abuse on surge from people publishing hundreds of GB of copy written PDFs. The results of which was a flood of DMCA complaints. If you have a pdf that you need to publish on surge we can whitelist your domain. You will just need to send us a link to your project.

rhythmus commented 7 years ago

So sad to learn Surge.sh got targeted by abusers! That’s why we can’t have nice things…

I came here after googling "surge.sh pdf". It puzzled me why the pdfs in my site’s source dir, deployed using the $ surge CLI, didn’t get served, as was previously the (expected) case. No warnings, no logs in the CLI; everything seemed okay, the CDN propagation and all. Requests for pdfs just returned 404s. So I looked into .surgeignore, and wondered whether the default behavior got changed. Apparently, so it did…

PDFs are very important to me — I’d even claim they’re an integral part of the Web; still the better option to @media print. I regularly publish nicely styled, printable pdfs alongside my html, for my readers’s convenience. I also prefer lightweight pdfs as the format of choice when it comes to delivering presentations/powerpoints. (As a matter of fact, last week I needed an online slide deck for a lecture and was lost at why I couldn’t use Surge.sh any longer.) Needless to say, in all such use cases it is obvious the publisher of the pdf is also its copyright holder.

I find it a shame the delivery format (pdf) is the victim of copyright infringement. Abusers will always find other ways: they could wrap pirated content in .zip, .rar, multipage .tiff, .ps files, and what have you — even in html itself, in base64 encoded URIs or whatever. tl;dr: you cannot ban delivery formats to mitigate file sharing abuse. There should be other means.

Don’t get me wrong here: I love Surge, I do feel with your DMCA harassment torment, and I totally understand why you decided simply banning pdfs in batch was the short cut solution to what must have been a disenchanting woe. But may I suggest an alternative approach?

Maybe you could allow PDFs for sites hosted on Surge, but with a custom domain, i.e. those with a CNAME file in their source, pointing to a domain owned by someone else (the publisher) than you guys. After all, legally, it is the domain owner (as on WHOIS record) who is liable for press offenses and copyright infringements, not the hosting provider. Also, the automated DMCA take-down requests would first go to the spammers/abusers/piraters. Who’d have to buy a domain first, setup the DNS records, before they could abuse the free tier of Surge hosting — I guess they’d move on very quickly…

Sorry for my ramblings. As I said, I love Surge, but am just desperate about hosting my pdfs. I hope you can work out a solution.

Meanwhile, please whitelist my domain, which is dodecaglotta.com.

Thanks a lot!

sintaxi commented 7 years ago

@rhythmus your account has been whitelisted.

siamkreative commented 7 years ago

@sintaxi Could you please whitelist siamkreative.com? I temporarily changed the link to my resume.

karel-brinda commented 7 years ago

@sintaxi Could you whitelist tp-zpevnik.surge.sh, please?

killerkiara commented 7 years ago

Hi @sintaxi and thanks for the explanations :) I needed to update my CV on my website and suddenly i could not figure out why it would return me a 404. Could you please whitelist my domain as well? It is chiara.codes. Thanks a lot!

eigenmannmartin commented 7 years ago

Hi @sintaxi yould you please whitelist eigenmannmartin.ch/ as well? Thanks a lot!

mike1808 commented 7 years ago

@sintaxi I hope you can whitelist my domain mmanukyan.io

vitordino commented 7 years ago

@sintaxi i need mine too vitordino.surge.sh

cowgirl-coding commented 7 years ago

@sintaxi I need my site whitelisted as well. kevinwaddle.com. A little explanation instead of a flat 404 would have been helpful. That was a major wtf moment.

JesseSoldat commented 7 years ago

@sintaxi Could you whitelist https://jesse-soldat.surge.sh

juandjara commented 7 years ago

Hello @sintaxi

Could you pls whitelist [https://fuken.xyz/CV-juandjara.pdf]() ?? That's my resume on my personal webpage

paulcpederson commented 7 years ago

@sintaxi when you get a moment, could you also whitelist paulcpederson.com ? Storing my resume in pdf format on there. Also, thanks for surge! Really amazing project...

AndreaCensi commented 7 years ago

@sintaxi Could you whitelist http://robot-design.org/ ?

(p.s. this policy really needs to be in the documentation)

gaelmaiano commented 7 years ago

Hi @sintaxi Could you whitelist http://gael.maiano.fr ? The pdf is my cv. Thanks

EliotSlevin commented 7 years ago

Hi @sintaxi

Could you please whitelist simulating-psychedelic-therapy.surge.sh, and barnett.surge.sh? My friend and I are using surge to host our thesis's, and we need to load two small PDF files.

Thanks heaps :)

nkandrewz commented 7 years ago

@sintaxi Could you please whitelist http://decalscentral.com ?

markpinero commented 7 years ago

@sintaxi could you please whitelist http://markpinero.com? Thank you!

axbwh commented 7 years ago

@sintaxi Hi, I would really appreciate it if you could white list dww.surge.sh, got a few pdf infographics that need to be published on the site. Cheers.

sureshbala commented 7 years ago

@sintaxi Please whitelist the website https://universaltechnoschool.com/ This is the website of a school and they would like to distribute School Brochure and Application Form

wesleyllewis commented 7 years ago

@sintaxi Could you please whitelist www.wesleylewis.us? Trying to host my CV. Thanks in advance!

jasonkuhrt commented 7 years ago

I got burnt by this silently, I guess my resume has been 404 for a few months now. Can you please whitelist http://jasonkuhrt.com. Thanks!

joshwilcken commented 7 years ago

@sintaxi please whitelist http://joshwilcken-portfolio.surge.sh/ I am attempting to whitelist my portfolio site.

cotyembry commented 7 years ago

@sintaxi can you please whitelist http://http://sovereignchickamaugacherokee.org/ I am needing to keep an application for hosted and available for the website. Thank you!

cotyembry commented 7 years ago

The way I worked around this issue while waiting for my domain to be whitelisted was to: #1 use github, #2 use an iframe in my site. I chose to embed an iframe in my page to make the domain/url to the user stay my domain name, then set the src of the iframe to be what the url is for the resource on github.com. To get the url, navigate to the file on github.com after logging and selecting your git project. Once in the git project, navigate to the file and you click view raw. Copy that url. The issue is, the raw view of the file isn't allow to be executed so the browser will just download the file. I.e. the raw url of a resource would look like: https://raw.githubusercontent.com/yourGITUsername/gitProjectName/master/asset/application_final.pdf

A trick, however, is to change the url to be the following instead:

`https://rawgit.com/yourGITUsername/gitProjectName/master/assets/application_final.pdf`

to allow the browser to correctly use the file type.

I hope this helps

shahidcodes commented 7 years ago

could you please whitelist my domain http://resume.shahidkamal.surge.sh

plugnburn commented 7 years ago

@sintaxi Please whitelist nihilcoin.surge.sh, the only PDF that needs to be published there is our group's manifesto.

micahjz commented 7 years ago

@sintaxi Hi, can you please whitelist my domain at www.micahzirn.com. I would like to include my résumé. Thanks!

organnoise commented 7 years ago

Hi could you please whitelist danielmcn.com?

Some of my images also won't upload for some reason, are there rules about certain images being uploaded too?

justinkan9 commented 7 years ago

I like many others, have a resume pdf file :) would love to get it whitelisted:

justinkang.surge.sh

EliotSlevin commented 7 years ago

I hope it's becoming apparent we need a more sustainable pdf system than requesting to be on a whitelist - how about a limit to the amount of pdfs you can upload on a free plan?

On Wed, 23 Aug 2017, 5:31 pm Justin S Kang notifications@github.com wrote:

I like many others, have a resume pdf file :) would love to get it whitelisted:

justinkang.surge.sh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sintaxi/surge/issues/257#issuecomment-324225468, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwZvr3Yfz-mBBN50uIcmKyINmw6nbHVks5sa7k3gaJpZM4Mh41i .

winstonlan commented 7 years ago

Could you whitelist my domain! winstonlan.me

woHangOnAMinute commented 7 years ago

us too!!! www.grabthegoanna.com.au www.grabthegoanna.surge.sh

miottid commented 7 years ago

Same here, could you whitelist us: cocotte-app.com Thanks

ran-research-lab commented 7 years ago

Could you pls whitelist 3033.surge.sh. I use it for my programming course. Thanks

audols commented 7 years ago

Hi could you whitelist audreyhsuolson.com? Trying to upload a PDF of my resume.

Thanks in advance!

sintaxi commented 7 years ago

Hey folks, we're working on a better long term solution for this problem as suggested by @EliotSlevin. until then DM your surge email address to @surge_sh to get whitelisted.

justinkan9 commented 7 years ago

@sintaxi

Hey, I don't have twitter, but hope you see this to whitelist me 👍

justinkan9@yahoo.com

lmflatt commented 7 years ago

Hey @sintaxi It seems like this is the place to get whitelisted for pdfs. Would you be able to add anthonybernarducci.surge.sh ? It's a site for a friend, and he just has a few scholarly publications to show off. My email is lee.m.flatt@gmail.com

Chisnits commented 7 years ago

DM'd on twitter but really trying to get whitelisted ASAP. my url is chasederr.surge.sh. my email is chasederr@gmail.com. Please let me know if anything can be done. @sintaxi

mqklin commented 7 years ago

@sintaxi DM'd on twitter as well, but no response. Please, whitelist zerion.io and dev.zerion.io. Thank you.

sintaxi commented 7 years ago

OK. I think you all have been added now.

mqklin commented 7 years ago

Thanks a lot!

jasonkuhrt commented 7 years ago

@sintaxi Not for me:

❯ curl -vs --insecure https://jasonkuhrt.com/resume.pdf
*   Trying 138.197.235.123...
* TCP_NODELAY set
* Connected to jasonkuhrt.com (138.197.235.123) port 443 (#0)
* WARNING: disabling hostname validation also disables SNI.
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.surge.sh
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
> GET /resume.pdf HTTP/1.1
> Host: jasonkuhrt.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: SurgeCDN/1.1.0
< Date: Mon, 25 Sep 2017 16:58:16 GMT
< Connection: close
< Content-Length: 0
<
* Closing connection 0
edwinbsmith commented 7 years ago

Can I get my domain, http://edwinsmith.org/, whitelisted? Thanks!

eddycaldas commented 7 years ago

@sintaxi would you whitelist my site please: https://eddycaldas.surge.sh/ Thank you much @sintaxi

ntucakovic commented 7 years ago

So sad for abusing such a great tool :(

I've spent hours debugging what might be happening with PDF, thought it was React route bug, never realized that it might be due to host issues... Can you please document it somewhere?

Also, if you can whitelist domains https://ntucakovic.surge.sh & www.ntmedia.me ? I have cloudflare behind ntmedia.me, so even less bandwidth will be spent for downloading that PDF.

Thank you!

oddmouse commented 7 years ago

@sintaxi Would you mind adding lindy.co to the PDF whitelist as well? Thank you!

alluster commented 7 years ago

@sintaxi Hey if you don't mind adding abbvie.surge.sh to the PDF whitelist also it would be great! Thank you!

jessehattabaugh commented 7 years ago

@sintaxi please add consciousfreedom.net to the PDF whitelist