Always makes unwanted http requests to API, instead of using existing recording
See original GitHub issueWhen I rerun acceptance tests, my recordings are updated every time. It seems to me like the expiresIn
option is not working. Am I missing anything obvious here w.r.t adding the config ?
I am using the "@pollyjs/ember"
version 2.3.1
ember addon to use pollyjs in my ember app.
I have the following config entry in my ember-cli-build.js
pollyjs: {
enabled: EmberApp.env() !== 'production',
expiresIn: '30d5h10m',
server: {
expiresIn: '30d5h10m',
keepUnusedRequests: false
}
}
Entry from package.json
:
{
...
"@pollyjs/ember": "^2.3.1",
...
}
Environment
Node.js v10.15.0
darwin 18.2.0
ember-cli: 3.7.0
node: 10.15.0
os: darwin x64
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Securing APIs: 10 Best Practices for Keeping Your Data and ...
Validate input. Never pass input from an API through to the endpoint without validating it first. Use rate limiting. Setting a threshold above ......
Read more >HTTP POST vs GET: Is One More Secure For Use In REST ...
This would be a reason to use GET for read-only API calls rather than POST. This section applies to traditional web applications and...
Read more >Best practices for REST API design - Stack Overflow Blog
Learn how to design REST APIs to be easy to understand for anyone, future-proof, secure, and fast since they serve data to clients...
Read more >Web API implementation - Best practices for cloud applications
Learn about best practices for implementing a web API and publishing it to make it available to client applications.
Read more >5 Tips to Optimize Your API's Performance - LoadNinja
#1. Cache Requests. Caching is one of the best ways to improve API performance. If you have requests that frequently produce the same...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @offirgolan I played around with the config option to
setupPolly
and I was able to get it working like I wanted.In case you are curious, this was the config that worked for me:
Np! Glad it worked out 😄