Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prefixed asset url with underscore

  • Loading branch information...
commit 684501b712140bedb406a65dd56998bfd911a7ac 1 parent 9a88485
@kmees kmees authored
View
6 src/IronSharePoint.Framework/IronRuntime.cs
@@ -35,12 +35,10 @@ private IronRuntime(Guid siteId)
Console = new IronConsole(ScriptRuntime);
}
- public IronULSLogger ULSLogger { get; private set; }
-
- public Exception InitializationException { get; private set; }
-
internal static Dictionary<Guid, IronRuntime> LivingRuntimes { get; private set; }
+ public IronULSLogger ULSLogger { get; private set; }
+ public Exception InitializationException { get; private set; }
public IronConsole Console { get; private set; }
public ScriptRuntime ScriptRuntime { get; private set; }
View
12 src/IronSharePoint/Features/IronSP_WebApp/IronSP_WebApp.EventReceiver.cs
@@ -21,7 +21,7 @@ namespace IronSharePoint.Features.IronSP_WebApp
[Guid("62d325a0-90f5-4b80-a484-4681c4b7de5d")]
public class IronSP_WebAppEventReceiver : SPFeatureReceiver
{
- private static readonly string modificationOwner = IronConstant.GetPrefixed("WebAppEventReceiver");
+ private static readonly string ModificationOwner = IronConstant.GetPrefixed("WebAppEventReceiver");
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
@@ -46,7 +46,7 @@ private static void RegisterHttpModule(SPWebApplication webApp)
Path = "configuration/system.webServer/modules",
Name = String.Format("add[@name='IronHttpModule'][@type='{0}']", httpModuleType.AssemblyQualifiedName),
Sequence = 0,
- Owner = modificationOwner,
+ Owner = ModificationOwner,
Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode,
Value = String.Format("<add name='IronHttpModule' type='{0}' />", httpModuleType.AssemblyQualifiedName)
};
@@ -61,7 +61,7 @@ private static void RegisterRackHttpHandler(SPWebApplication webApp)
Path = "configuration/system.webServer/handlers",
Name = String.Format("add[@name='RackHttpHandler'][@type='{0}']", httpHandlerType.AssemblyQualifiedName),
Sequence = 0,
- Owner = modificationOwner,
+ Owner = ModificationOwner,
Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode,
Value = String.Format("<add name='RackHttpHandler' path='_iron/*' verb='*' type='{0}' /> ",
httpHandlerType.AssemblyQualifiedName)
@@ -71,9 +71,9 @@ private static void RegisterRackHttpHandler(SPWebApplication webApp)
Path = "configuration/system.webServer/handlers",
Name = String.Format("add[@name='AssetsHttpHandler'][@type='{0}']", httpHandlerType.AssemblyQualifiedName),
Sequence = 0,
- Owner = modificationOwner,
+ Owner = ModificationOwner,
Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode,
- Value = String.Format("<add name='AssetsHttpHandler' path='assets/*' verb='*' type='{0}' />",
+ Value = String.Format("<add name='AssetsHttpHandler' path='_assets/*' verb='GET' type='{0}' />",
httpHandlerType.AssemblyQualifiedName)
};
webApp.WebConfigModifications.Add(rackMod);
@@ -86,7 +86,7 @@ public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
var webApplication = properties.Feature.Parent as SPWebApplication;
var webMods = webApplication.WebConfigModifications;
- var modsToRemove = webMods.Where(mod => mod.Owner == modificationOwner).ToList();
+ var modsToRemove = webMods.Where(mod => mod.Owner == ModificationOwner).ToList();
modsToRemove.ForEach(m => webMods.Remove(m));
// Remove it and save the change to the configuration database
View
3  src/IronSharePoint/TEMPLATE/Features/IronSP_Root/iron_sharepoint.rb
@@ -1,6 +1,5 @@
require 'active_support/core_ext'
-require 'iron_sharepoint/ext/log4r'
-require 'iron_sharepoint/ext/rack'
+require 'iron_sharepoint/ext/all'
module IronSharePoint
Dir["iron_sharepoint/**/*.rb"].each do |file|
View
2  src/IronSharePoint/TEMPLATE/Features/IronSP_Root/iron_sharepoint/application.rb
@@ -45,7 +45,7 @@ def to_app assets
use Rack::ContentLength
use Rack::ShowExceptions
- map '/assets' do
+ map '/_assets' do
run assets
end
View
3  src/IronSharePoint/TEMPLATE/Features/IronSP_Root/iron_sharepoint/ext/all.rb
@@ -0,0 +1,3 @@
+require 'iron_sharepoint/ext/kernel'
+require 'iron_sharepoint/ext/log4r'
+require 'iron_sharepoint/ext/rack'
View
6 src/IronSharePoint/TEMPLATE/Features/IronSP_Root/iron_sharepoint/ext/rack/handlers/iron_sp.rb
@@ -85,7 +85,7 @@ def write_response res, status, headers, body
def truncate_path(key, value)
case key
when "PATH_INFO"
- if (match = /\/assets\/.*$/.match(value))
+ if (match = /\/_assets\/.*$/.match(value))
match[0]
elsif (match = /_iron(\/.*)$/.match(value))
match[1]
@@ -93,8 +93,8 @@ def truncate_path(key, value)
value
end
when "SCRIPT_NAME"
- if value =~ /\/assets\//
- "/assets"
+ if value =~ /\/_assets\//
+ "/_assets"
else
match = /_iron(\/[^\/]+)/.match(value)
match.nil? ? value : match[1]
Please sign in to comment.
Something went wrong with that request. Please try again.