Commit afdb105c44b762400a82d2b9710a58c2e2e73883
1 parent
3fbd6551
add origin
Showing
4 changed files
with
5 additions
and
52 deletions
Show diff stats
src/Maps/Maps.sln deleted
| 1 | - | ||
| 2 | -Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| 3 | -# Visual Studio 14 | ||
| 4 | -VisualStudioVersion = 14.0.25420.1 | ||
| 5 | -MinimumVisualStudioVersion = 10.0.40219.1 | ||
| 6 | -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Maps", "Maps.xproj", "{C746E65B-78A5-44E0-8A27-A21E016DC9C7}" | ||
| 7 | -EndProject | ||
| 8 | -Global | ||
| 9 | - GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| 10 | - Debug|Any CPU = Debug|Any CPU | ||
| 11 | - Release|Any CPU = Release|Any CPU | ||
| 12 | - EndGlobalSection | ||
| 13 | - GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| 14 | - {C746E65B-78A5-44E0-8A27-A21E016DC9C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| 15 | - {C746E65B-78A5-44E0-8A27-A21E016DC9C7}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| 16 | - {C746E65B-78A5-44E0-8A27-A21E016DC9C7}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| 17 | - {C746E65B-78A5-44E0-8A27-A21E016DC9C7}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| 18 | - EndGlobalSection | ||
| 19 | - GlobalSection(SolutionProperties) = preSolution | ||
| 20 | - HideSolutionNode = FALSE | ||
| 21 | - EndGlobalSection | ||
| 22 | -EndGlobal |
src/Maps/Maps.xproj deleted
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | - <PropertyGroup> | ||
| 4 | - <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
| 5 | - <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
| 6 | - </PropertyGroup> | ||
| 7 | - <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
| 8 | - <PropertyGroup Label="Globals"> | ||
| 9 | - <ProjectGuid>c746e65b-78a5-44e0-8a27-a21e016dc9c7</ProjectGuid> | ||
| 10 | - <RootNamespace>Maps</RootNamespace> | ||
| 11 | - <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> | ||
| 12 | - <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> | ||
| 13 | - <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
| 14 | - </PropertyGroup> | ||
| 15 | - <PropertyGroup> | ||
| 16 | - <SchemaVersion>2.0</SchemaVersion> | ||
| 17 | - </PropertyGroup> | ||
| 18 | - <ItemGroup> | ||
| 19 | - <DnxInvisibleContent Include="bower.json" /> | ||
| 20 | - <DnxInvisibleContent Include=".bowerrc" /> | ||
| 21 | - </ItemGroup> | ||
| 22 | - <Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
| 23 | -</Project> |
src/Maps/Maps.xproj.user deleted
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | -<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | - <PropertyGroup> | ||
| 4 | - <ActiveDebugProfile>IIS Express</ActiveDebugProfile> | ||
| 5 | - </PropertyGroup> | ||
| 6 | -</Project> | ||
| 7 | \ No newline at end of file | 0 | \ No newline at end of file |
src/Maps/Startup.cs
| @@ -37,6 +37,7 @@ namespace Maps | @@ -37,6 +37,7 @@ namespace Maps | ||
| 37 | // This method gets called by the runtime. Use this method to add services to the container. | 37 | // This method gets called by the runtime. Use this method to add services to the container. |
| 38 | public void ConfigureServices(IServiceCollection services) | 38 | public void ConfigureServices(IServiceCollection services) |
| 39 | { | 39 | { |
| 40 | + services.AddCors(); | ||
| 40 | services.AddScoped<PostgresDbContext>(); | 41 | services.AddScoped<PostgresDbContext>(); |
| 41 | 42 | ||
| 42 | services.AddScoped<IBusStopDs, BusStopDs>(); | 43 | services.AddScoped<IBusStopDs, BusStopDs>(); |
| @@ -56,7 +57,10 @@ namespace Maps | @@ -56,7 +57,10 @@ namespace Maps | ||
| 56 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) | 57 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) |
| 57 | { | 58 | { |
| 58 | 59 | ||
| 59 | - | 60 | + app.UseCors(builder => |
| 61 | + builder.WithOrigins("http://localhost:3000") | ||
| 62 | + .AllowAnyHeader() | ||
| 63 | + ); | ||
| 60 | app.UseDeveloperExceptionPage(); | 64 | app.UseDeveloperExceptionPage(); |
| 61 | app.UseBrowserLink(); | 65 | app.UseBrowserLink(); |
| 62 | 66 |