I have an angular application that uses Okta for authentication. I have Nginx configured as below:
server {
listen 80 default_server;
location / {
return 200;
access_log off;
}
location /admin {
alias /usr/share/nginx/html;
index index.html;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
try_files $uri $uri/ /index.html?$args;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
and docker file as:
FROM node:lts-alpine As builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install --ignore-scripts
COPY . ./
ENV PATH="./node_modules/.bin:$PATH"
RUN npm run build --prod
FROM nginx:stable-alpine-slim
COPY nginx/default.conf.template /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist/admin/ /usr/share/nginx/html
When I start the application and navigate to the page localhost:4200/admin it takes me through the entire process of authentication but at the end, I land on an empty blank page. Is there any problem with the way the things are configured?
TIA