-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Version
fastly (13.1.0)
Ruby 3.4.0
What happened
As stated in the README, I initialize the client with:
# Rails.application.credentials.fastly_api_token is a valid, confirmed-working API token
Fastly.configure do |config|
config.api_token = Rails.application.credentials.fastly_api_token
end
This results in an error:
IndexError: string not matched
from .../fastly-13.1.0/lib/fastly/configuration.rb:60:in 'String#[]='
When setting api_key
instead:
Fastly.configure do |config|
config.api_key = Rails.application.credentials.fastly_api_token
end
There is no error and the value of Rails.application.credentials.fastly_api_token
is the output.
However, with config.api_key
set, all requests fail with a 401 response.
I can only get things working if I forcibly set the environment variable:
ENV["FASTLY_API_TOKEN"] = Rails.application.credentials.fastly_api_token
Metadata
Metadata
Assignees
Labels
No labels