www.test-cors.org Open in urlscan Pro
2a00:1450:4001:80e::2013  Public Scan

URL: https://www.test-cors.org/
Submission: On October 22 via manual from CH — Scanned from DE

Form analysis 2 forms found in the DOM

<form class="form-horizontal">
  <legend>Client</legend>
  <div class="control-group" id="client_method_div" title="" data-content="Which HTTP method the client should use when making the request." data-original-title="Help: HTTP Method">
    <label class="control-label" for="client_method">HTTP Method</label>
    <div class="controls">
      <select id="client_method" class="span2">
        <option value="HEAD">HEAD</option>
        <option value="GET" selected="">GET</option>
        <option value="POST">POST</option>
        <option value="PUT">PUT</option>
        <option value="PATCH">PATCH</option>
        <option value="DELETE">DELETE</option>
        <option value="OPTIONS">OPTIONS</option>
      </select>
    </div>
  </div>
  <div class="control-group" id="client_credentials_div" title="" data-content="Whether the client should include cookies in the request." data-original-title="Help: With credentials?">
    <label class="control-label" for="client_credentials">With credentials?</label>
    <div class="controls">
      <input type="checkbox" id="client_credentials">
    </div>
  </div>
  <div class="control-group" id="client_headers_div" title="" data-content="A list of custom request headers to include in the request. One header per line, in the format key: value." data-original-title="Help: Request Headers">
    <label class="control-label" for="client_headers">Request Headers</label>
    <div class="controls">
      <textarea id="client_headers" class="span2" rows="4"></textarea>
    </div>
  </div>
  <div class="control-group" id="client_postdata_div" title="" data-content="Data that the client will send in the body of the request." data-original-title="Help: Request Content">
    <label class="control-label" for="client_postdata">Request Content</label>
    <div class="controls">
      <textarea id="client_postdata" class="span2" rows="4"></textarea>
    </div>
  </div>
  <div class="control-group">
    <div class="controls">
      <button class="btn btn-large btn-primary" type="button" id="btnSendRequest">Send Request</button>
    </div>
  </div>
</form>

<form class="form-horizontal">
  <legend>Server</legend>
  <ul class="nav nav-tabs" id="server_tabs">
    <li class="active"><a href="#tabremote" data-toggle="tab" id="remote">Remote</a></li>
    <li><a href="#tablocal" data-toggle="tab" id="local">Local</a></li>
  </ul>
  <div class="tab-content">
    <div class="tab-pane active" id="tabremote">
      <div class="control-group" id="server_url_div" title="" data-content="The URL to test for CORS support." data-original-title="Help: Remote URL">
        <label class="control-label" for="server_url">Remote URL</label>
        <div class="controls">
          <input type="text" id="server_url" class="span2">
        </div>
      </div>
    </div>
    <div class="tab-pane" id="tablocal">
      <div class="control-group" id="server_enable_div" title="" data-content="Whether or not the server should allow CORS requests." data-original-title="Help: Enable CORS">
        <label class="control-label" for="server_enable">Enable CORS</label>
        <div class="controls">
          <input type="checkbox" id="server_enable" checked="">
        </div>
      </div>
      <div class="control-group" id="server_status_div" title="" data-content="The HTTP Status code the server should respond with. Default: 200." data-original-title="Help: HTTP Status">
        <label class="control-label" for="server_status">HTTP Status</label>
        <div class="controls">
          <input type="text" id="server_status" value="200" class="span1">
        </div>
      </div>
      <div class="control-group" id="server_credentials_div" title="" data-content="Whether the server should allow cookies on the request." data-original-title="Help: Allow Credentials">
        <label class="control-label" for="server_credentials">Allow Credentials</label>
        <div class="controls">
          <input type="checkbox" id="server_credentials">
        </div>
      </div>
      <div class="control-group" id="server_methods_div" title="" data-content="Comma-delimited list of HTTP methods the server should allow." data-original-title="Help: Allow Methods">
        <label class="control-label" for="server_methods">Allow Methods</label>
        <div class="controls">
          <input type="text" id="server_methods" class="span2">
        </div>
      </div>
      <div class="control-group" id="server_headers_div" title="" data-content="Comma-delimited list of HTTP headers the server should allow." data-original-title="Help: Allow Headers">
        <label class="control-label" for="server_headers">Allow Headers</label>
        <div class="controls">
          <input type="text" id="server_headers" class="span2">
        </div>
      </div>
      <div class="control-group" id="server_expose_headers_div" title="" data-content="Comma-delimited list of HTTP response headers that the client should be able to view." data-original-title="Help: Expose Headers">
        <label class="control-label" for="server_expose_headers">Expose Headers</label>
        <div class="controls">
          <input type="text" id="server_expose_headers" class="span2">
        </div>
      </div>
      <div class="control-group" id="server_max_age_div" title="" data-content="The time, in seconds, that the preflight response should be cached for." data-original-title="Help: Max Age">
        <label class="control-label" for="server_max_age">Max Age</label>
        <div class="controls">
          <input type="text" id="server_max_age" class="span2">
        </div>
      </div>
      <div class="control-group" id="server_response_headers_div" title="" data-content="Custom headers to include in the server response." data-original-title="Help: Response Headers">
        <label class="control-label" for="server_response_headers">Response Headers</label>
        <div class="controls">
          <textarea id="server_response_headers" class="span2" rows="3"></textarea>
        </div>
      </div>
    </div>
  </div>
</form>

Text Content

TEST-CORS.ORG

Use this page to test CORS requests. You can either send the CORS request to a
remote server (to test if CORS is supported), or send the CORS request to a test
server (to explore certain features of CORS). Send feedback or browse the source
here: https://github.com/monsur/test-cors.org.

Client
HTTP Method
HEAD GET POST PUT PATCH DELETE OPTIONS
With credentials?

Request Headers

Request Content

Send Request
Server
 * Remote
 * Local

Remote URL

Enable CORS

HTTP Status

Allow Credentials

Allow Methods

Allow Headers

Expose Headers

Max Age

Response Headers

 * Results
 * Code

var createCORSRequest = function(method, url) {
  var xhr = new XMLHttpRequest();
  if ("withCredentials" in xhr) {
    // Most browsers.
    xhr.open(method, url, true);
  } else if (typeof XDomainRequest != "undefined") {
    // IE8 & IE9
    xhr = new XDomainRequest();
    xhr.open(method, url);
  } else {
    // CORS not supported.
    xhr = null;
  }
  return xhr;
};

var url = '';
var method = '';
var xhr = createCORSRequest(method, url);

xhr.onload = function() {
  // Success code goes here.
};

xhr.onerror = function() {
  // Error code goes here.
};

xhr.send();