-
Fairly new to Netbox & am having issues running the script for the device type import. Some info on my box
I have an SSL cert which I installed yesterday, no issues and when connecting to the web server it tells me the certificate is valid. Whenever I try to run the script with the following boolean "IGNORE SSL_ERRORS = False" set in the .env file, I receive the following output error and I just don't understand what the issue is or why. I had a self signed cert before I was able to install a verified one. I wasnt able to run the script before I had the cert but now that it is installed I am still not able to run this script. (venv) root@dcim-netbox:~/Device-Type-Library-Import# ./nb-dt-import.py During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): I figured that ignoring the SSL cert error would fix the issue however when I set the boolean to true, I receive this following error. (venv) root@dcim-netbox: Someone please help me understand where I am going wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If your filepath is /opt/netbox/netbox/netbox API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be |
Beta Was this translation helpful? Give feedback.
If your filepath is /opt/netbox/netbox/netbox
you should go to configure your configuration.py file. Change this single setting from = False to = True and it worked for me immediately after.
API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be
allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or
CORS_ORIGIN_REGEX_WHITELIST. For more information, see https://github.com/ottoyiu/django-cors-headers
CORS_ORIGIN_ALLOW_ALL = True
CORS_ORIGIN_WHITELIST = [