Skip to content

Commit

Permalink
cors headers
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg committed Jul 21, 2021
1 parent 9aa76d9 commit fe675d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ RUN pip3 install rdflib
RUN pip3 install treelib
RUN pip3 install nltk
RUN python -m nltk.downloader stopwords
RUN pip3 install cherrypy_cors

5 changes: 3 additions & 2 deletions src/webservice.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import cherrypy, json, sys
import cherrypy, json, sys, cherrypy_cors

from topic_assistant import TopicAssistant

Expand All @@ -20,6 +20,7 @@ def topics(self):

a = TopicAssistant()

config = {'server.socket_host': '0.0.0.0'}
config = {'server.socket_host': '0.0.0.0', 'cors.expose.on': True}
cherrypy_cors.install()
cherrypy.config.update(config)
cherrypy.quickstart(WebService())

0 comments on commit fe675d7

Please sign in to comment.