Added CORS shit

This commit is contained in:
Benjamyn Love 2020-04-02 12:17:25 +11:00
parent c458892376
commit 6b4d6f9752

View File

@ -4,6 +4,7 @@ import socket
import json import json
import os import os
from flask import Flask, render_template from flask import Flask, render_template
from flask_cods import CORS
CheckPrinterOnline = '7e4d3630312053310d0a' CheckPrinterOnline = '7e4d3630312053310d0a'
MachingInfo = "7e4d3131350d0a" MachingInfo = "7e4d3131350d0a"
@ -17,6 +18,7 @@ HOST = os.environ.get('IPADDR') # The server's hostname or IP address
PORT = 8899 # The port used by the server PORT = 8899 # The port used by the server
application = Flask(__name__) application = Flask(__name__)
CORS(application)
application.config["DEBUG"] = True application.config["DEBUG"] = True
def checkPrinterOnline(): def checkPrinterOnline():