summaryrefslogtreecommitdiff
path: root/DSACore
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-09-27 19:42:06 +0200
committerTrueDoctor <d-kobert@web.de>2018-09-27 19:42:06 +0200
commit09b0c5be9e23247411da850497b9cc6519d8f155 (patch)
tree771e022164ccde965f7d23fbbfc28587d5193987 /DSACore
parente8dc39bf293aa0c6f2eb27104d5023c5a56e1ba4 (diff)
testing
Diffstat (limited to 'DSACore')
-rw-r--r--DSACore/Hubs/ChatHub.cs4
-rw-r--r--DSACore/Startup.cs9
-rw-r--r--DSACore/libman.json14
3 files changed, 24 insertions, 3 deletions
diff --git a/DSACore/Hubs/ChatHub.cs b/DSACore/Hubs/ChatHub.cs
index 44d86e1..6af8c38 100644
--- a/DSACore/Hubs/ChatHub.cs
+++ b/DSACore/Hubs/ChatHub.cs
@@ -1,8 +1,8 @@
-using Microsoft.AspNetCore.SignalR;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.SignalR;
namespace DSACore.Hubs
{
diff --git a/DSACore/Startup.cs b/DSACore/Startup.cs
index 1745ea4..efbd7b1 100644
--- a/DSACore/Startup.cs
+++ b/DSACore/Startup.cs
@@ -26,8 +26,14 @@ namespace DSACore
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
- services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+ services.AddCors(options =>
+ {
+ options.AddPolicy("AllowSpecificOrigin",
+ builder => builder.WithOrigins("https://console.firebase.google.com/project/heldenonline-4d828"));
+ });
+ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+
services.AddSignalR();
}
@@ -45,6 +51,7 @@ namespace DSACore
app.UseHttpsRedirection();
app.UseSignalR(routes => { routes.MapHub<ChatHub>("/chatHub"); });
+ app.UseCors("AllowSpecificOrigin");
app.UseMvc();
}
}
diff --git a/DSACore/libman.json b/DSACore/libman.json
new file mode 100644
index 0000000..5c82187
--- /dev/null
+++ b/DSACore/libman.json
@@ -0,0 +1,14 @@
+{
+ "version": "1.0",
+ "defaultProvider": "unpkg",
+ "libraries": [
+ {
+ "library": "@aspnet/signalr@1.0.3",
+ "destination": "wwwroot/lib/@aspnet/signalr/",
+ "files": [
+ "dist/browser/signalr.js",
+ "dist/browser/signalr.min.js"
+ ]
+ }
+ ]
+} \ No newline at end of file