Open yannik1015 opened 3 years ago
Is your CherryPy up to date? Outdated CherryPy was the cause of the other issues.
Alternatively a workaround exists but it's not an ideal solution: https://github.com/smicallef/spiderfoot/issues/536#issuecomment-665285520
The spiderfoot.scanlist.js
file should be served with Content-Type: application/javascript
:
# curl -isk 'http://127.0.0.1:5001/static/js/spiderfoot.scanlist.js'
HTTP/1.1 200 OK
Content-Type: application/javascript
Server: server
Date: Sun, 13 Jun 2021 03:31:58 GMT
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Security-Policy: default-src 'self' ; script-src 'self' 'unsafe-inline' blob: ; style-src 'self' 'unsafe-inline' ; img-src 'self' data:
Referrer-Policy: no-referrer, strict-origin-when-cross-origin
Last-Modified: Tue, 20 Apr 2021 22:30:54 GMT
Accept-Ranges: bytes
Content-Length: 13876
CherryPy is up to date with version 18.6.0
Hello, Adding the following cherrypy config option on sf.py solved this problem for me on Windows
'tools.staticdir.content_types': {'js': 'text/javascript'}
# Enable access to static files via the web directory
conf = {
'/query': {
'tools.encode.text_only': False,
'tools.encode.add_charset': True,
},
'/static': {
'tools.staticdir.on': True,
'tools.staticdir.dir': 'static',
'tools.staticdir.root': f"{os.path.dirname(os.path.abspath(__file__))}/spiderfoot",
'tools.staticdir.content_types': {'js': 'text/javascript'}
}
}
hope it helps
Hey I think i am having the same Issue as #536 with the difference that i am running Windows 10. Using Ubuntu with the WSL works fine though so the problem seems only to occour on Windows.
Here the console log from the webbrowser: