Enable cross origin for subdomainHow to solve “ExpiresActive not allowed here” error message in .htaccess...
ip vs ifconfig commands pros and cons
Can I retract my name from an already published manuscript?
Which aircraft had such a luxurious-looking navigator's station?
How do we edit a novel that's written by several people?
Why can I easily sing or whistle a tune I've just heard, but not as easily reproduce it on an instrument?
What is the purpose of easy combat scenarios that don't need resource expenditure?
Why do members of Congress in committee hearings ask witnesses the same question multiple times?
Auto Insert date into Notepad
It took me a lot of time to make this, pls like. (YouTube Comments #1)
Sometimes a banana is just a banana
What php.ini used my system?
awk unexpectedly removes dot from string
Eww, those bytes are gross
Unexpected behavior of Bash script: First executes function, afterwards executes alias
How to add multiple differently colored borders around a node?
What's the rationale behind the objections to these measures against human trafficking?
What is better: yes / no radio, or simple checkbox?
Meth dealer reference in Family Guy
How do ISS astronauts "get their stripes"?
Dilemma of explaining to interviewer that he is the reason for declining second interview
Has the Isbell–Freyd criterion ever been used to check that a category is concretisable?
I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?
Do authors have to be politically correct in article-writing?
Inventor that creates machine that grabs man from future
Enable cross origin for subdomain
How to solve “ExpiresActive not allowed here” error message in .htaccess file?How can I enable PHP5 for a site? Having problems with every single methodHow to use htaccess to rewrite to new base directory for filesHow Do I Set Up a Subdomain with a Separate Webhost and Domain Registrar?Setting Access-Control-Allow-Origin in .htaccess for Https protocolhtaccess conditional header set is ignoring the conditionHow to convert header to hostname in Apache?need htaccess to define wildcard subdomain for a wordpress multisite installLet's Encrypt wildcard certificates and Apache 2 not working
I have 2 subdomains, av.xyz.example
and video.xyz.example
. I want to enable CORS for video.xyz.example
on av.xyz.example
.
I have added the following code snippet in the apache configuration file of av.xyz.com
Header set Access-Control-Allow-Origin "video.xyz.example"`
But I get the following error
The 'Access-Control-Allow-Origin' header contains the invalid value 'video.xyz.example'. Origin 'https://video.xyz.example' is therefore not allowed access.`
I tried doing it with *
and still got an error that it is not permissible for a wildcard, tried doing it using - ^(.*.xyz.example)$
and still got the error, invalid value.
What should be the correct value in my scenario?
.htaccess apache2
bumped to the homepage by Community♦ 6 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have 2 subdomains, av.xyz.example
and video.xyz.example
. I want to enable CORS for video.xyz.example
on av.xyz.example
.
I have added the following code snippet in the apache configuration file of av.xyz.com
Header set Access-Control-Allow-Origin "video.xyz.example"`
But I get the following error
The 'Access-Control-Allow-Origin' header contains the invalid value 'video.xyz.example'. Origin 'https://video.xyz.example' is therefore not allowed access.`
I tried doing it with *
and still got an error that it is not permissible for a wildcard, tried doing it using - ^(.*.xyz.example)$
and still got the error, invalid value.
What should be the correct value in my scenario?
.htaccess apache2
bumped to the homepage by Community♦ 6 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have 2 subdomains, av.xyz.example
and video.xyz.example
. I want to enable CORS for video.xyz.example
on av.xyz.example
.
I have added the following code snippet in the apache configuration file of av.xyz.com
Header set Access-Control-Allow-Origin "video.xyz.example"`
But I get the following error
The 'Access-Control-Allow-Origin' header contains the invalid value 'video.xyz.example'. Origin 'https://video.xyz.example' is therefore not allowed access.`
I tried doing it with *
and still got an error that it is not permissible for a wildcard, tried doing it using - ^(.*.xyz.example)$
and still got the error, invalid value.
What should be the correct value in my scenario?
.htaccess apache2
I have 2 subdomains, av.xyz.example
and video.xyz.example
. I want to enable CORS for video.xyz.example
on av.xyz.example
.
I have added the following code snippet in the apache configuration file of av.xyz.com
Header set Access-Control-Allow-Origin "video.xyz.example"`
But I get the following error
The 'Access-Control-Allow-Origin' header contains the invalid value 'video.xyz.example'. Origin 'https://video.xyz.example' is therefore not allowed access.`
I tried doing it with *
and still got an error that it is not permissible for a wildcard, tried doing it using - ^(.*.xyz.example)$
and still got the error, invalid value.
What should be the correct value in my scenario?
.htaccess apache2
.htaccess apache2
edited Jul 24 '18 at 0:07
![](https://i.stack.imgur.com/mPL7x.png?s=32&g=1)
![](https://i.stack.imgur.com/mPL7x.png?s=32&g=1)
Patrick Mevzek
2,83731025
2,83731025
asked Jul 23 '18 at 14:56
Rick RoyRick Roy
121312
121312
bumped to the homepage by Community♦ 6 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 6 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It looks like you may be specifying the origin incorrectly. Try this instead:
Header set Access-Control-Allow-Origin "https://video.xyz.example"
add a comment |
Hi I was able to solve it using this code
<IfModule mod_headers.c>
SetEnvIfNoCase Origin "https?://(www.)?(xyz.com|video.xyz.com)(:d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
</IfModule>
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f923165%2fenable-cross-origin-for-subdomain%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It looks like you may be specifying the origin incorrectly. Try this instead:
Header set Access-Control-Allow-Origin "https://video.xyz.example"
add a comment |
It looks like you may be specifying the origin incorrectly. Try this instead:
Header set Access-Control-Allow-Origin "https://video.xyz.example"
add a comment |
It looks like you may be specifying the origin incorrectly. Try this instead:
Header set Access-Control-Allow-Origin "https://video.xyz.example"
It looks like you may be specifying the origin incorrectly. Try this instead:
Header set Access-Control-Allow-Origin "https://video.xyz.example"
answered Jul 24 '18 at 1:22
![](https://i.stack.imgur.com/hpjCr.jpg?s=32&g=1)
![](https://i.stack.imgur.com/hpjCr.jpg?s=32&g=1)
moebiusmoebius
1313
1313
add a comment |
add a comment |
Hi I was able to solve it using this code
<IfModule mod_headers.c>
SetEnvIfNoCase Origin "https?://(www.)?(xyz.com|video.xyz.com)(:d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
</IfModule>
add a comment |
Hi I was able to solve it using this code
<IfModule mod_headers.c>
SetEnvIfNoCase Origin "https?://(www.)?(xyz.com|video.xyz.com)(:d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
</IfModule>
add a comment |
Hi I was able to solve it using this code
<IfModule mod_headers.c>
SetEnvIfNoCase Origin "https?://(www.)?(xyz.com|video.xyz.com)(:d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
</IfModule>
Hi I was able to solve it using this code
<IfModule mod_headers.c>
SetEnvIfNoCase Origin "https?://(www.)?(xyz.com|video.xyz.com)(:d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
</IfModule>
answered Jul 26 '18 at 13:21
Rick RoyRick Roy
121312
121312
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f923165%2fenable-cross-origin-for-subdomain%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown