tleyden / open-ocr

Run your own OCR-as-a-Service using Tesseract and Docker
Apache License 2.0
1.33k stars 223 forks source link

first try at adding CORS #15

Closed mcqueenorama closed 7 years ago

mcqueenorama commented 10 years ago

I'm quite new to go. This looks like it might be right. I don't have a full test setup here. Is this close or what? I used some guy's middleware in the express style to add CORS support.

tleyden commented 10 years ago

I think rather than enabling this by default, which some people might not want, the cli-httpd/main.go executable should take a flag like --cors, and only if that flag is passed will it add CORS support. That way, people that don't care about CORS won't be affected at all.

mcqueenorama commented 10 years ago

I like that plan. I'll add that.

On Mon, Sep 8, 2014 at 8:07 AM, Traun Leyden notifications@github.com wrote:

I think rather than enabling this by default, which some people might not want, the cli-httpd/main.go executable should take a flag like --cors, and only if that flag is passed will it add CORS support. That way, people that don't care about CORS won't be affected at all.

— Reply to this email directly or view it on GitHub https://github.com/tleyden/open-ocr/pull/15#issuecomment-54834206.

the news wire of the 21st century - twitchy.com

tleyden commented 7 years ago

Closing this due to age. Sorry this never made it in, but it will be a useful reference point if this gets re-added sometime.