Expected behavior
Able to open forest in production.
Actual behavior
1st ERROR (without client id)
2nd error (with client id)
What is the current behavior?
Hello everyone!
I am using Rails 5.1, ruby 2.7.4 .
- I tried restarting server.
- Cleared cache.
- udpated CORS cofigs in application.rb , no it looks like this:
config.load_defaults 5.1
null_regex = Regexp.new(/\Anull\z/)
config.middleware.insert_before 0, Rack::Cors do
allow do
hostnames = [null_regex, 'localhost:3000', 'app.forestadmin.com', 'localhost:3001']
hostnames += ENV['CORS_ORIGINS'].split(',') if ENV['CORS_ORIGINS']
origins hostnames
resource '*',
headers: :any,
methods: :any,
expose: ['Content-Disposition'],
credentials: true
end
end```
* Added forest URL to secrets.yml and initializer
forest_liana.rb:
ForestLiana.env_secret = Rails.application.secrets.forest_env_secret
ForestLiana.auth_secret = Rails.application.secrets.forest_auth_secret
ForestLiana.application_url = Rails.application.secrets.forest_application_url
in secrets.yml
forest_application_url: <%= ENV[“APPLICATION_URL”] %>
* Added Http initializer
require ‘httpclient’
class HTTPClient
alias original_initialize initialize
def initialize(*args, &block)
original_initialize(*args, &block)
# Force use of the default system CA certs (instead of the 6 year old bundled ones)
@session_manager&.ssl_config&.set_default_paths
end
end
Until now I had 500 error when inspecting the code.
* So i decided to add client_id . I added it to secters.yml and to forest_liana.rb .
ForestLiana.env_secret = Rails.application.secrets.forest_env_secret
ForestLiana.auth_secret = Rails.application.secrets.forest_auth_secret
ForestLiana.application_url = Rails.application.secrets.forest_application_url
ForestLiana.forest_client_id = Rails.application.secrets.forest_client_id
So now I have GET https://www.gravatar.com/avatar/e30ed105537f357ef10afcf0cab74e78?s=80&d=404 404
&&
chunk.7.3063f605868b6fe645c9.js:353 GET https://api.forestadmin.com/oidc/auth?client_id=eyJra****** 400 (Bad Request)
Please let me know what else can be done?
Please include any relevant log snippets, if necessary.
## Context
Please provide any relevant information about your setup.
Rails 5.1 , ruby 2.7.4
* Package Version: gem is updated to 7.2.2
* Express Version:
* Sequelize Version:
* Database Dialect: postgres
* Database Version:
* Project Name: Spare Leash