From 4bc797284e035421226ee95c9a2e5ad5be110c72 Mon Sep 17 00:00:00 2001 From: YoungHypo Date: Fri, 6 Dec 2024 15:56:19 -0800 Subject: [PATCH] delete new source for posts and comments in cors for guest mode --- config/initializers/cors.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 19978f5..315c77c 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -2,18 +2,8 @@ allow do origins 'http://localhost:8000', /\Ahttp:\/\/.*\.elasticbeanstalk\.com\z/ - - resource '/api/posts', - headers: :any, - methods: [:get, :post], - credentials: false - - resource '/api/comments', - headers: :any, - methods: [:get, :post], - credentials: false - resource '/api/*', + resource '*', headers: :any, methods: [:get, :post, :put, :patch, :delete, :options, :head], credentials: true