-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set cookie headers only on requests to host in url (#337)
- Loading branch information
1 parent
8900f23
commit 16c931f
Showing
19 changed files
with
876 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
:: | ||
|
||
+---------------+ +-----------------+ | ||
| | POST http://callback.example.com/ | | | ||
| | { | | | ||
| | "request_id": "118e35f631be802c41b…", | | | ||
| | "status": "success", | | | ||
| | "headers": { | | | ||
| | "content-type": "text/html;" | | | ||
| Your | }, | | | ||
| callback | "content": "PGRvY3R5cGUgaHRtbD4=" | Asynchronous | | ||
| handler | } | HTTP | | ||
| | | Retriever | | ||
| | <-----------------------------------------------------+ | | | ||
+---------------+ +-----------------+ | ||
+-------------+ +--------------+ | ||
| | POST http://callback.example.com/ | | | ||
| | { | | | ||
| | "request_id": "118e35f631be802c41b…", | | | ||
| | "status": "success", | | | ||
| | "headers": { | | | ||
| | "content-type": "text/html;" | | | ||
| Your | }, | | | ||
| callback | "content": "PGRvY3R5cGUgaHRtbD4=" | Asynchronous | | ||
| handler | } | HTTP | | ||
| | | Retriever | | ||
| | <---------------------------------------------------------+ | | | ||
+-------------+ +--------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
:: | ||
|
||
+---------------+ +-----------------+ | ||
| | | | | ||
| | POST http://localhost:8001/ | | | ||
| | url=http://example.com/ | | | ||
| | callback=http://callback.example.com/ | | | ||
| | headers={"User-Agent":"Chrome, honest"} | Asynchronous | | ||
| Your | | HTTP | | ||
| application | +-----------------------------------------------------> | retriever | | ||
| | | | | ||
| | | | | ||
| | | | | ||
| | | | | ||
| | HTTP 200 OK | | | ||
| | Content-Type: application/json | | | ||
| | | | | ||
| | "118e35f631be802c41bec5c9dfb0f415" | | | ||
| | <-----------------------------------------------------+ | | | ||
+---------------+ +-----------------+ | ||
+--------------+ +--------------+ | ||
| | | | | ||
| | POST http://localhost:8001/ | | | ||
| | url=http://example.com/ | | | ||
| | callback=http://callback.example.com/ | | | ||
| | headers={ | | | ||
| | "User-Agent":"Chrome, honest" | | | ||
| | } | | | ||
| | parameters={ | | | ||
| | "cookies": { | | | ||
| | } | | | ||
| | } | | | ||
| | | | | ||
| | | | | ||
| | | Asynchronous | | ||
| Your | | HTTP | | ||
| application | +--------------------------------------------------------> | retriever | | ||
| | | | | ||
| | | | | ||
| | | | | ||
| | | | | ||
| | HTTP 200 OK | | | ||
| | Content-Type: application/json | | | ||
| | | | | ||
| | "118e35f631be802c41bec5c9dfb0f415" | | | ||
| | <--------------------------------------------------------+ | | | ||
+--------------+ +--------------+ | ||
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Send a ``POST`` request containing ``url``, ``callback`` and (optionally) ``header`` values. Content for the given | ||
``url`` will be retrieved *eventually* and sent in a ``POST`` request to the specified ``callback`` url. | ||
Send a ``POST`` request containing ``url``, ``callback``, (optionally) ``header`` and (optionally) ``parameter`` values. | ||
Content for the given ``url`` will be retrieved *eventually* and sent in a ``POST`` request to the specified | ||
``callback`` url. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace App\Model; | ||
|
||
class CookieParameters | ||
{ | ||
private $domain; | ||
private $path; | ||
|
||
public function __construct(string $domain, string $path) | ||
{ | ||
$this->domain = $domain; | ||
$this->path = $path; | ||
} | ||
|
||
public function getDomain(): string | ||
{ | ||
return $this->domain; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return $this->path; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.