aslushnikov / latex-online

Online latex compiler. You give it a link, it gives you PDF
http://latexonline.cc
MIT License
497 stars 89 forks source link

Blocked by CORS policy #30

Closed asblanco closed 7 years ago

asblanco commented 7 years ago

Hi, I wanted to use the API on my development Angular 4 application, so the origin is http://localhost:4200, but I'm being blocked by your server's CORS policy. I also tried other two domains I have and I've been blocked too. Is this something you want? or am I missing something :/ Thanks.

aslushnikov commented 7 years ago

Hi Andrea,

Indeed, CORS is not enabled since there's been no need - and no good use case.

Would iframe work for you instead? If not, could you please share a bit of details about your project - why would you need to fetch PDFs via ajax? It might be an interesting use case we didn't think about.

asblanco commented 7 years ago

Hi,

Well I want to generate a LaTex PDF based on a pool of questions and answers to create a multiple choice test, so of course I can just do it on the server side. But I was trying your API in case the user can preview the PDF, maybe make more changes and finally upload the array of questions and answers to the server.

aslushnikov commented 7 years ago

I see, thanks! I did a simple pdf generator to illustrate iframe approach - would it work for you?

asblanco commented 7 years ago

Oh I see, yes that can perfectly work. Thank you!