Added ability for Runtime and RenderMode to be set per Site - enabling the framework to support multiple hosting models concurrently in the same installation. Fixed WebAssembly Prerendering issue (this also resolved the issue where the component taghelper was not passing parameters correctly to the app when running on WebAssembly). Fix #1702 - remove web,config from upgrade package.
This commit is contained in:
@ -102,15 +102,7 @@ namespace Oqtane.Controllers
|
||||
[HttpGet("load")]
|
||||
public IActionResult Load()
|
||||
{
|
||||
if (_configManager.GetSection("Runtime").Value == "WebAssembly")
|
||||
{
|
||||
return File(GetAssemblies(), System.Net.Mime.MediaTypeNames.Application.Octet, "oqtane.dll");
|
||||
}
|
||||
else
|
||||
{
|
||||
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
return null;
|
||||
}
|
||||
return File(GetAssemblies(), System.Net.Mime.MediaTypeNames.Application.Octet, "oqtane.dll");
|
||||
}
|
||||
|
||||
private byte[] GetAssemblies()
|
||||
|
@ -84,10 +84,16 @@ namespace Oqtane.Controllers
|
||||
[Authorize(Roles = RoleNames.Admin)]
|
||||
public Site Put(int id, [FromBody] Site site)
|
||||
{
|
||||
if (ModelState.IsValid && site.SiteId == _alias.SiteId && site.TenantId == _alias.TenantId && _sites.GetSite(site.SiteId, false) != null)
|
||||
var current = _sites.GetSite(site.SiteId, false);
|
||||
if (ModelState.IsValid && site.SiteId == _alias.SiteId && site.TenantId == _alias.TenantId && current != null)
|
||||
{
|
||||
site = _sites.UpdateSite(site);
|
||||
_syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Site, site.SiteId);
|
||||
bool reload = false;
|
||||
if (current.Runtime != site.Runtime || current.RenderMode != site.RenderMode)
|
||||
{
|
||||
reload = true;
|
||||
}
|
||||
_syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Site, site.SiteId, reload);
|
||||
_logger.Log(site.SiteId, LogLevel.Information, this, LogFunction.Update, "Site Updated {Site}", site);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user