Skip to content

Highlight cors for header authorization in doc #106

Description

@deniciocode

Only by allowing specific headers I was able to make an authorised request to the api.

 Rails.application.config.middleware.insert_before 0, Rack::Cors do
   allow do
     origins 'localhost:4200', 'http://localhost:4200/'

     resource '*',
       headers: ['Authorization', 'X-Refresh-Token', 'X-CSRF-Token'],
       expose: ['Authorization', 'X-Refresh-Token', 'X-CSRF-Token'],
       credentials: true,
       max_age: 600,
       methods: [:get, :post, :put, :patch, :delete, :options, :head]
   end
 end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions