Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url : url,
- dataType : 'html',
- success : function(data, status, xhr) {
- $(dataContainer).append(data);
- },
- complete: function(xhr, status, error) {
- if (xhr.status != 200) {
- $.logger(xhr.getResponseHeader('Location'));
- }
- }
- });
- $.ajax({
- xhrFields: { withCredentials: true },
- url : url,
- dataType : 'html',
- success : function(data, status, xhr) {
- $(dataContainer).append(data);
- },
- complete: function(xhr, status, error) {
- if (xhr.status != 200) {
- $.logger(xhr.getResponseHeader('Location'));
- }
- }
- });
- response.setHeader("Access-Control-Allow-Origin", "*");
- response.setHeader("Access-Control-Allow-Methods", "GET,POST,OPTIONS");
- response.setHeader("Access-Control-Max-Age", "1728000");
- response.setHeader("Access-Control-Allow-Headers", "Cookie,X-Requested-With");
- response.setHeader("Access-Control-Allow-Credentials", "true");
- response.setHeader("Access-Control-Expose-Headers", "Location");
- response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
- $.ajax({
- xhrFields: { withCredentials: true },
- url : url,
- dataType : 'html',
- crossDomain: true,
- success : function(data, status, xhr) {
- $(dataContainer).append(data);
- },
- complete: function(xhr, status, error) {
- if (xhr.status != 200) {
- $.logger(xhr.getResponseHeader('Location'));
- }
- }
- });
- jQuery.support.cors = true;
- param.async = true;
- param.xhrFields = { withCredentials: true };
- param.crossDomain = true,
- param.processData = false;
- param.headers = {
- "content-type":"application/json",
- "cache-control": "no-cache",
- }
- var request = $.ajax(param);
- request.done(function( result,status,xhr ){
- console.log(xhr.getResponseHeader("Location"));
- });
- Cache-control: no-cache, no-store
- Connection: keep-alive
- Content-Length: 1403
- Content-Type: text/html; charset=utf-8
- Date: Wed, 23 May 2018 05:23:14 GMT
- Location: https://accounts.google.com/o/oauth2/v2/auth?state=<my state code>&redirect_uri=<my redirect url>&prompt=select_account&response_type=code&client_id=<my client id>&scope=<my scope>&access_type=online
- Server: nginx/1.4.6 (Ubuntu)
- X-Content-Type-Options: nosniff
Add Comment
Please, Sign In to add comment