← All tasks
🧮
Intermediate

Write a Restrictive CORS Header

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP header() call that allows cross-origin requests only from a specific trusted domain.

Scenario

An API was mistakenly allowing requests from any origin and needs to be locked down to one trusted frontend.

Ready to try it?

Create a free account and subscribe to take "Write a Restrictive CORS Header". Earn 90 XP and track your internship progress.

Already have an account? Sign in