How to enable CORS in Jhipster

jhipster:
cors:
# Allow Ionic for JHipster by default (* no longer allowed in Spring Boot 2.4+)
allowed-origins: ‘http://localhost:8100,http://localhost:9000'
allowed-methods: ‘*’
allowed-headers: ‘*’
exposed-headers: ‘Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params’
allow-credentials: true
max-age: 1800
allowed-origins: 'http://localhost:8100,http://localhost:9000, http://localhost:3000'

--

--

--

System Administrator and Full stack web developer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

10 ES6 Block Bindings And Function Core Topics You Should Know

Release your features with confidence

HPJS: Hyperparameter Optimization for Javascript

How I Switched from TypeScript to ReScript

Vue vs React

Getting the most out of TypeScript’s type system

(Re)Introducing Nx Console

Upgrading your terminal experience with iTerm2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Himanshu Pratap

Himanshu Pratap

System Administrator and Full stack web developer.

More from Medium

Enable HTTPS using GoDaddy Generated SSL Certificate in Springboot

The Big Fuss about Log4j & CVE-2021–44228

Automating tests with Squash DEVOPS

ALL Enterprise Java applications are exposed to this security vulnerability