Google App Script and Axios with CORS problem [duplicate]
This question already has an answer here:
How does Access-Control-Allow-Origin header work?
11 answers
How to allow CORS?
22 answers
I'm just developing a front-end application and I've used the google application script to be able to access Google spreadsheets without needing a back-end, but when making requests with axes, there's a problem with CORS.
What can I do? Or should I really write a backend?
** EDIT
As I will not host the site on the same server as google, then it is not possible to enable cors on my backend, as I am not the owner of google.
javascript google-apps-script cors axios
marked as duplicate by sideshowbarker
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 at 4:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How does Access-Control-Allow-Origin header work?
11 answers
How to allow CORS?
22 answers
I'm just developing a front-end application and I've used the google application script to be able to access Google spreadsheets without needing a back-end, but when making requests with axes, there's a problem with CORS.
What can I do? Or should I really write a backend?
** EDIT
As I will not host the site on the same server as google, then it is not possible to enable cors on my backend, as I am not the owner of google.
javascript google-apps-script cors axios
marked as duplicate by sideshowbarker
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 at 4:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
I solved. I changed the output of the google app script to JSONP and it worked.
– Felipe Paulo
Nov 24 at 21:38
add a comment |
This question already has an answer here:
How does Access-Control-Allow-Origin header work?
11 answers
How to allow CORS?
22 answers
I'm just developing a front-end application and I've used the google application script to be able to access Google spreadsheets without needing a back-end, but when making requests with axes, there's a problem with CORS.
What can I do? Or should I really write a backend?
** EDIT
As I will not host the site on the same server as google, then it is not possible to enable cors on my backend, as I am not the owner of google.
javascript google-apps-script cors axios
This question already has an answer here:
How does Access-Control-Allow-Origin header work?
11 answers
How to allow CORS?
22 answers
I'm just developing a front-end application and I've used the google application script to be able to access Google spreadsheets without needing a back-end, but when making requests with axes, there's a problem with CORS.
What can I do? Or should I really write a backend?
** EDIT
As I will not host the site on the same server as google, then it is not possible to enable cors on my backend, as I am not the owner of google.
This question already has an answer here:
How does Access-Control-Allow-Origin header work?
11 answers
How to allow CORS?
22 answers
javascript google-apps-script cors axios
javascript google-apps-script cors axios
edited Nov 24 at 21:40
asked Nov 23 at 2:29
Felipe Paulo
12
12
marked as duplicate by sideshowbarker
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 at 4:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by sideshowbarker
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 at 4:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
I solved. I changed the output of the google app script to JSONP and it worked.
– Felipe Paulo
Nov 24 at 21:38
add a comment |
I solved. I changed the output of the google app script to JSONP and it worked.
– Felipe Paulo
Nov 24 at 21:38
I solved. I changed the output of the google app script to JSONP and it worked.
– Felipe Paulo
Nov 24 at 21:38
I solved. I changed the output of the google app script to JSONP and it worked.
– Felipe Paulo
Nov 24 at 21:38
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
I solved. I changed the output of the google app script to JSONP and it worked.
– Felipe Paulo
Nov 24 at 21:38