Permalink
Browse files

FIX: Webfonts not served when silpa is not hosted in documentroot

  • Loading branch information...
1 parent 64dcbb4 commit 51c21d3f938a58797cf4eac8d4a72feb6de04032 @copyninja copyninja committed Feb 4, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/silpa/modules/webfonts/webfonts.py
@@ -61,7 +61,12 @@ def serve(self,font=None):
return "Error!, Font not available"
http_host =self.request.get('HTTP_HOST')
request_uri =self.request.get('REQUEST_URI')
- #BUG: fails when server address is like http://domain/silpa/xxxx
+
+ silpalogger.debug("Request URI "+request_uri)
+
+ if request_uri != None:
+ http_host += "/"+get_base_url()
+
font_url = "http://"+http_host+"/modules/webfonts/font/"
css = '''@font-face {
font-family: '$$FONTFAMILY$$';

0 comments on commit 51c21d3

Please sign in to comment.