j3d
j3d

Reputation: 9724

How to Let JavaScript Apps Loaded from Any Domain Access All Public Assets When CORS Is Enabled

In my Play application I've implemented a filter that enables CORS by defaul... but since the backend also sends emails to users (e.g. password reset, user verification after registration, etc.) and these HTML emails need to access some public assets (i.e. icons, logo, etc), I'm wondering how to let anyone access all assets in /public.

Upvotes: 0

Views: 24

Answers (1)

Daniel Olszewski
Daniel Olszewski

Reputation: 14401

If you haven't implemented any authentication logic yet everything should be publicly accessible. It is up to an e-mail client if it allows external http resources in mail content and CORS has nothing to do with it.

Upvotes: 1

Related Questions