_example

command
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

cors example

ie.

Unsuccessful Preflight request: =============================== $ curl -i http://localhost:3000/ -H "Origin: http://no.com" -H "Access-Control-Request-Method: GET" -X OPTIONS HTTP/1.1 200 OK Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers Date: Fri, 28 Jul 2017 17:55:47 GMT Content-Length: 0 Content-Type: text/plain; charset=utf-8

Successful Preflight request: ============================= $ curl -i http://localhost:3000/ -H "Origin: http://example.com" -H "Access-Control-Request-Method: GET" -X OPTIONS HTTP/1.1 200 OK Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET Access-Control-Allow-Origin: http://example.com Access-Control-Max-Age: 300 Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers Date: Fri, 28 Jul 2017 17:56:44 GMT Content-Length: 0 Content-Type: text/plain; charset=utf-8

Content request (after a successful preflight): =============================================== $ curl -i http://localhost:3000/ -H "Origin: http://example.com" HTTP/1.1 200 OK Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: http://example.com Access-Control-Expose-Headers: Link Vary: Origin Date: Fri, 28 Jul 2017 17:57:52 GMT Content-Length: 7 Content-Type: text/plain; charset=utf-8

welcome%

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL