Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POA-2390 Exclude certain Cloud API endpoints from Repro Mode #50

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

liujed
Copy link
Member

@liujed liujed commented Nov 18, 2024

Tested locally:

 has_payload | response_code | method |        host_port         |        path  
-------------+---------------+--------+--------------------------+--------------------
 f           |           200 | GET    | api.getpostman-stage.com | /aoeu
 f           |           200 | POST   | api.getpostman-stage.com | /environments
 f           |           200 | GET    | api.getpostman-stage.com | /environments/aoeu
 f           |           200 | PUT    | api.getpostman-stage.com | /environments/aoeu
 f           |           200 | GET    | api.getpostman.com       | /aoeu
 f           |           200 | POST   | api.getpostman.com       | /environments
 f           |           200 | GET    | api.getpostman.com       | /environments/aoeu
 f           |           200 | PUT    | api.getpostman.com       | /environments/aoeu
 f           |           200 | GET    | localhost                | /aoeu
 f           |           200 | POST   | localhost                | /environments
 f           |           200 | GET    | localhost                | /environments/aoeu
 f           |           200 | PUT    | localhost                | /environments/aoeu
 f           |           404 | POST   | api.getpostman-stage.com | /environments
 f           |           404 | GET    | api.getpostman-stage.com | /environments/aoeu
 f           |           404 | PUT    | api.getpostman-stage.com | /environments/aoeu
 f           |           404 | POST   | api.getpostman.com       | /environments
 f           |           404 | GET    | api.getpostman.com       | /environments/aoeu
 f           |           404 | PUT    | api.getpostman.com       | /environments/aoeu
 t           |           404 | GET    | api.getpostman-stage.com | /aoeu
 t           |           404 | GET    | api.getpostman.com       | /aoeu
 t           |           404 | GET    | localhost                | /aoeu
 t           |           404 | POST   | localhost                | /environments
 t           |           404 | GET    | localhost                | /environments/aoeu
 t           |           404 | PUT    | localhost                | /environments/aoeu
(24 rows)

@liujed liujed requested a review from mgritter November 18, 2024 23:30
}

switch httpMeta.Host {
case "api.getpostman-stage.com", "api.getpostman.com":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that unfortunately there are several more domain names that are possible than this.

I tried and api.postman.com worked, while api.postman.co got a 301 (but maybe we need to match it anyway?)

I will communicate some possible sources of truth offline.

@liujed liujed requested a review from mgritter November 19, 2024 19:04
@liujed liujed merged commit 1b16e0f into main Nov 19, 2024
4 checks passed
@liujed liujed deleted the jed/poa-2390 branch November 19, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants