-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix operation on Google Chrome (add CORS support + change documentati…
…on on opening client-side websocket)
- Loading branch information
Showing
4 changed files
with
8 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,16 @@ | |
from subprocess import Popen | ||
|
||
import smartcard.System | ||
from smartcard.CardConnection import CardConnection | ||
from smartcard.CardConnectionObserver import CardConnectionObserver | ||
from smartcard.CardMonitoring import CardMonitor, CardObserver | ||
from smartcard.ReaderMonitoring import ReaderMonitor, ReaderObserver | ||
from smartcard.Exceptions import CardConnectionException | ||
|
||
from flask import Flask, render_template, request | ||
from flask import Flask, request | ||
from flask_cors import CORS | ||
from flask_sock import Sock | ||
|
||
|
||
APP_VERSION = "3.0" | ||
APP_VERSION = "3.1" | ||
APP_NAME = "JulianaNFC" | ||
APP_AUTHOR = "Kevin Alberts, I.C.T.S.V. Inter-/Actief/" | ||
APP_SUPPORT = "[email protected]" | ||
|
@@ -264,6 +263,7 @@ def update(self, observable, actions): | |
app.debug = False | ||
app.config['SECRET_KEY'] = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(20)) | ||
sock = Sock(app) | ||
cors = CORS(app, supports_credentials=True) | ||
|
||
|
||
socket_clients = [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
pyscard>=2.0,<2.1 | ||
flask | ||
flask-sock>=0.5,<1.0 | ||
flask-cors>=3.0.10,<3.1 | ||
wxPython>=4.1.1 | ||
plyer>=2.0.0,<2.1 |