Enhance your CORS config for using Github Codespaces

When using Codespaces in your browser, you’ll need to add this CORS policy:

allowed-origin-patterns: 'https?://*.githubpreview.dev

Find an example of how to change that in my generated jHipster application:

solve CORS error · SandraAhlgrimm/jhipster-sample-devcontainer@e0191f6 (github.com)

Screenshot of the PR to fix the CORS issue

And to make sure, you won’t have to do that in your next generated project, we added this to the jHipster generator. https://github.com/jhipster/generator-jhipster/pull/17683

Published by Sandra Ahlgrimm

Cloud Advocate @ Azure with a passion for Java and containers

Leave a comment