IvanRockMen
3 years agoOccasional Visitor
How enable CORS in Swagger Ui in Docker
I have docker-compose file
version: '3'
services:
swagger-ui:
image: swaggerapi/swagger-ui
container_name: swagger-ui
volumes:
- /home/ivan.bartenev/swaggerUi/docs:/usr/share/nginx/html/docs
- /home/ivan.bartenev/swaggerUi/docs:/docs
env_file:
- .env
networks:
- app-network
nginx:
container_name: nginx
image: "nginx:stable-alpine"
depends_on:
- swagger-ui
ports:
- "443:443"
- "80:80"
volumes:
- "/home/ivan.bartenev/swaggerUi/configs/ssl:/etc/ssl"
- "/home/ivan.bartenev/swaggerUi/configs/nginx:/etc/nginx/conf.d"
- "/home/ivan.bartenev/swaggerUi/logs/nginx:/var/log/nginx"
networks:
- app-network
networks:
app-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.23.0.0/16
How enable CORS in dockerised swagger-ui?