Call our API from Github pages
-
Problems: A Github page cannot call our API link from a different server
-
Solution:
- Modify your API file
- Append
web.header('Access-Control-Allow-Origin', 'https://ntson2002.github.io')
class JccRreTagger:
def POST(self):
web.header('Access-Control-Allow-Origin', 'https://ntson2002.github.io')