diff --git a/Teknik/Areas/Shortener/Controllers/ShortenerController.cs b/Teknik/Areas/Shortener/Controllers/ShortenerController.cs index 37d92e1..5798a3e 100644 --- a/Teknik/Areas/Shortener/Controllers/ShortenerController.cs +++ b/Teknik/Areas/Shortener/Controllers/ShortenerController.cs @@ -69,5 +69,13 @@ namespace Teknik.Areas.Shortener.Controllers } return Json(new { error = "Must be a valid Url" }); } + + [AllowAnonymous] + public ActionResult Verify() + { + ViewBag.Title = "Url Shortener Verification - " + Config.Title; + ShortenViewModel model = new ShortenViewModel(); + return View(model); + } } } \ No newline at end of file diff --git a/Teknik/Areas/Shortener/ShortenerAreaRegistration.cs b/Teknik/Areas/Shortener/ShortenerAreaRegistration.cs index 4cc1ab7..1abab3f 100644 --- a/Teknik/Areas/Shortener/ShortenerAreaRegistration.cs +++ b/Teknik/Areas/Shortener/ShortenerAreaRegistration.cs @@ -43,6 +43,14 @@ namespace Teknik.Areas.Shortener new { controller = "Shortener", action = "RedirectToUrl" }, // Parameter defaults new[] { typeof(Controllers.ShortenerController).Namespace } ); + context.MapSubdomainRoute( + "Shortener.Verify", // Route name + new List() { string.Empty }, // Subdomains + new List() { config.ShortenerConfig.ShortenerHost }, // domains + "", // URL with parameters + new { controller = "Shortener", action = "Verify" }, // Parameter defaults + new[] { typeof(Controllers.ShortenerController).Namespace } + ); // Register Script Bundles BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/shortener", config.CdnHost).Include( diff --git a/Teknik/Areas/Shortener/Views/Shortener/View.cshtml b/Teknik/Areas/Shortener/Views/Shortener/View.cshtml new file mode 100644 index 0000000..0f4f264 --- /dev/null +++ b/Teknik/Areas/Shortener/Views/Shortener/View.cshtml @@ -0,0 +1,18 @@ + +@{ + Layout = null; +} + + + + + + + View + + +
+ Verification +
+ + diff --git a/Teknik/Teknik.csproj b/Teknik/Teknik.csproj index c0102f9..7cf9d2e 100644 --- a/Teknik/Teknik.csproj +++ b/Teknik/Teknik.csproj @@ -590,6 +590,7 @@ +