LoginSignup
0
0

More than 5 years have passed since last update.

serverlessでapikeysがうまく動かないとき

Posted at

何があった?

serverlessのサンプルに習ってもapi key制約がうまく行かなくて、こまっていた。

serverless.yml
provider:

  ...

  apiKeys:
    - hoge


functions:
  hello:
    handler: hello.read
    events:
      - http:
          path: hello
          method: get
          private: true

どうなった?

issuesがあがってた。

どうした?

使用プランを定義してapiとkeyを紐付けてあげるとちゃんとアクセス制限される
https://gyazo.com/5960f72a7fef7bfed674e36f279dc761

やったね!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0