ljm625 / syntaxnet-rest-api

A simple rest api for Google SyntaxNet, powered by docker
GNU General Public License v3.0
72 stars 29 forks source link

Server CORS (CROSS-ORIGIN RESOURCE SHARING) requests handling issue (DRAGNN branch). #8

Closed malakhovks closed 7 years ago

malakhovks commented 7 years ago
Server CORS (CROSS-ORIGIN RESOURCE SHARING) requests handling issue (DRAGNN branch).

There will be great to add possibility to server to handling CORS requests. In my case, the parsing server is working behind a specially designed queue server, and there is no such big problem. But to work with the parsing server directly, you need to add headers in server code that includes CORS support: ('Access-Control-Allow-Origin: *'); ('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); ('Access-Control-Allow-Headers: Content-Type, Content-Range, Content-Disposition, Content-Description');

ljm625 commented 7 years ago

yep, that's a very good suggestion, will just add a few lines of code and fix it ;)

malakhovks commented 7 years ago

Ok will wait

ljm625 commented 7 years ago

should be fixed