0
내 CherryPy 설치시 라스베리에 문제가 있습니다. 나는 아약스와 CherryPy의 기능을 요청하면CherryPy 액세스 제어 허용 - 오리진
나는이 메시지를 가지고 :
XMLHttpRequest cannot load http://my_ip:8888/takePicture. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://my_ip' is therefore not allowed access.
내 파이썬 코드 : CherryPy와
import time
import os
import cherrypy
class Camera(object):
@cherrypy.expose
def takePicture(self):
os.system('fswebcam -r 1280x720 -S 3 --info Salon --jpeg 100 --save images/history/%H%M%S.jpg')
os.system('fswebcam -r 1280x720 -S 3 --info Salon --jpeg 100 --save images/last.jpg')
if __name__ == '__main__':
cherrypy.config.update({'server.socket_host': 'my_ip'})
cherrypy.config.update({'server.socket_port': 8888})
cherrypy.quickstart(Camera())
어떻게 변화 헤더 응답? 사전에 의해
감사합니다 =)
가능한 복제 [ "아니오 '액세스 제어 - - 원산지 허용'헤더가"Cherrypy와 오류 (HTTP : //stackoverflow.com/questions/27141122/no-access-control-allow-origin-header-is-present-error-with-cherrypy) – webKnjaZ