Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cors issue with https enabled? #76

Open
nida opened this issue Jun 28, 2024 · 5 comments
Open

Cors issue with https enabled? #76

nida opened this issue Jun 28, 2024 · 5 comments

Comments

@nida
Copy link

nida commented Jun 28, 2024

Used Docker compose to install Uptime kuma and the Web API, Trying to access the API from another application and we get a cors issue.

@ayyoobvm
Copy link

Yes , Same issue happened to me while testing flutter App in chrome . Is there any solution?

@nida
Copy link
Author

nida commented Nov 17, 2024

Made code changes to this repo: https://github.com/nida/Uptime-Kuma-Web-API

@ayyoobvm
Copy link

Tried Your repo
Getting these errors api-1 | [2024-11-20 09:28:39 +0000] [1] [INFO] Starting gunicorn 20.1.0
api-1 | [2024-11-20 09:28:39 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
api-1 | [2024-11-20 09:28:39 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
api-1 | [2024-11-20 09:28:39 +0000] [7] [INFO] Booting worker with pid: 7
api-1 | [2024-11-20 09:28:39 +0000] [7] [ERROR] Exception in worker process
api-1 | Traceback (most recent call last):
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
api-1 | worker.init_process()
api-1 | File "/app/venv/lib/python3.9/site-packages/uvicorn/workers.py", line 66, in init_process
api-1 | super(UvicornWorker, self).init_process()
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
api-1 | self.load_wsgi()
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
api-1 | self.wsgi = self.app.wsgi()
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
api-1 | self.callable = self.load()
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
api-1 | return self.load_wsgiapp()
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
api-1 | return util.import_app(self.app_uri)
api-1 | File "/app/venv/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
api-1 | mod = importlib.import_module(module)
api-1 | File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
api-1 | return _bootstrap._gcd_import(name[level:], package, level)
api-1 | File "", line 1030, in _gcd_import
api-1 | File "", line 1007, in _find_and_load
api-1 | File "", line 986, in _find_and_load_unlocked
api-1 | File "", line 680, in _load_unlocked
api-1 | File "", line 850, in exec_module
api-1 | File "", line 228, in _call_with_frames_removed
api-1 | File "/app/main.py", line 27, in
api-1 | CORSMiddleware,
api-1 | NameError: name 'CORSMiddleware' is not defined
api-1 | [2024-11-20 09:28:39 +0000] [7] [INFO] Worker exiting (pid: 7)
api-1 | [2024-11-20 09:28:39 +0000] [1] [INFO] Shutting down: Master
api-1 | [2024-11-20 09:28:39 +0000] [1] [INFO] Reason: Worker failed to boot.
Any fix ?

@nida
Copy link
Author

nida commented Nov 20, 2024 via email

@ayyoobvm
Copy link

Yes the above logs from docker .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants