* fixed broken mime types
This commit is contained in:
		
							parent
							
								
									7d2080a1d1
								
							
						
					
					
						commit
						127df8b2a3
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -18,8 +18,14 @@
 | 
			
		|||
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
'''
 | 
			
		||||
import os
 | 
			
		||||
import mimetypes
 | 
			
		||||
from flask import Blueprint, send_from_directory
 | 
			
		||||
 | 
			
		||||
# Was having some mime type issues on windows, this appeared to fix it.
 | 
			
		||||
# we have no-sniff set, so if the mime types are invalid sripts can't load.
 | 
			
		||||
mimetypes.add_type('application/javascript', '.js')
 | 
			
		||||
mimetypes.add_type('text/css', '.css')
 | 
			
		||||
 | 
			
		||||
static_files_bp = Blueprint('staticfiles', __name__)
 | 
			
		||||
 | 
			
		||||
root = os.getcwd() + '/static-data/www/' # should be set to onionr install directory from onionr startup
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue