Changed CORS policy allow all origins
Added Dockerfile to website Changed Ports
This commit is contained in:
parent
32dc58715e
commit
e2917d2f2e
@ -1,7 +1,6 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 6530
|
||||||
EXPOSE 443
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
@ -36,7 +36,7 @@ builder.Services.AddCors(options =>
|
|||||||
options.AddPolicy(name: corsHeader,
|
options.AddPolicy(name: corsHeader,
|
||||||
policy =>
|
policy =>
|
||||||
{
|
{
|
||||||
policy.WithOrigins("http://localhost", "http://127.0.0.1", "http://localhost:63342");
|
policy.WithOrigins("*");
|
||||||
policy.WithMethods("GET", "POST", "DELETE");
|
policy.WithMethods("GET", "POST", "DELETE");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
4
Website/Dockerfile
Normal file
4
Website/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FROM nginx:1.10.1-alpine
|
||||||
|
COPY . /usr/share/nginx/html
|
||||||
|
EXPOSE 6531
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
@ -1,4 +1,4 @@
|
|||||||
const apiUri = "http://localhost:5177";
|
const apiUri = "http://localhost:6530";
|
||||||
|
|
||||||
async function GetData(uri){
|
async function GetData(uri){
|
||||||
let request = await fetch(uri, {
|
let request = await fetch(uri, {
|
||||||
|
Loading…
Reference in New Issue
Block a user