limit CORS only to /api/*

This commit is contained in:
Nuwan 2024-04-26 16:35:45 +05:30
parent 40fbc7b430
commit cb0cb654c8
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins Rails.configuration.spa_origin
resource '*',
resource '/api/*',
headers: :any,
methods: [:get, :post, :delete, :options],
credentials: true