nginx enabling CORS for multiple subdomainsHow do I add Access-Control-Allow-Origin in NGINX?Nginx proxy pass works for https but not httpnginx proxy redirecting request to different proxyNginx/Apache: set HSTS only if X-Forwarded-Proto is httpsnginx rewrite throw 404 with last and breakNginX + WordPress + SSL + non-www + W3TC vhost config file questionsnginx reverse proxy hide login query also on 301 redirect or full qualified urlnginx: CORS headers are not added for OPTIONS requestConfigure NGINX : How to handle 500 Error on upstream itself, While Nginx handle other 5xx errorsNGINX virtual host config for Magento2 in a subfolder

how do we prove that a sum of two periods is still a period?

Why is the sentence "Das ist eine Nase" correct?

Car headlights in a world without electricity

Should I tell management that I intend to leave due to bad software development practices?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?

How dangerous is XSS

Do creatures with a speed 0ft., fly 30ft. (hover) ever touch the ground?

Can compressed videos be decoded back to their uncompresed original format?

How can a day be of 24 hours?

In Bayesian inference, why are some terms dropped from the posterior predictive?

In the UK, is it possible to get a referendum by a court decision?

Are British MPs missing the point, with these 'Indicative Votes'?

Could the museum Saturn V's be refitted for one more flight?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

Finding the reason behind the value of the integral.

How to stretch the corners of this image so that it looks like a perfect rectangle?

How could indestructible materials be used in power generation?

Is this draw by repetition?

Notepad++ delete until colon for every line with replace all

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Blending or harmonizing

Mathematica command that allows it to read my intentions

How do conventional missiles fly?



nginx enabling CORS for multiple subdomains


How do I add Access-Control-Allow-Origin in NGINX?Nginx proxy pass works for https but not httpnginx proxy redirecting request to different proxyNginx/Apache: set HSTS only if X-Forwarded-Proto is httpsnginx rewrite throw 404 with last and breakNginX + WordPress + SSL + non-www + W3TC vhost config file questionsnginx reverse proxy hide login query also on 301 redirect or full qualified urlnginx: CORS headers are not added for OPTIONS requestConfigure NGINX : How to handle 500 Error on upstream itself, While Nginx handle other 5xx errorsNGINX virtual host config for Magento2 in a subfolder













0















My nginx version: nginx/1.4.6



I have an issue enabling CORS for multiple subdomains. I checked https://gist.github.com/algal/5480916 and http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/ but both solutions doesn't work for me.



It looks like the regex



if ($http_origin ~* (.*.mydomain.com)) 
set $cors "true";



is not matching and $cors is not set to "true" and therefor add_header 'Access-Control-Allow-Origin' "$http_origin" won't be executed.



I also tried with regex




$http_origin ~* (https?://.*.mydomain.com)




or




$http_origin ~* https?://.*.mydomain.com




But in either case the regex doesn't match and $cors will never set to "true".



What am I missing?



My nginx configuration - domain name in curly braces (is getting replaced by Ansible):



upstream varnish 
server localhost:80;


server
listen 443 default;
server_name vhost;

ssl on;
ssl_certificate /etc/ssl/certs/ssl.domain.crt;
ssl_certificate_key /etc/ssl/private/domain.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;

# workaround remote exploit. Fixed in 1.5.0, 1.4.1
#
# http://mailman.nginx.org/pipermail/nginx-announce/2013/000112.html
if ($http_transfer_encoding ~* chunked)
return 444;


proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;

proxy_redirect off;

# CORS
set $cors "";
if ($http_origin ~* (.*.domain))
set $cors "true";


location /
# Set the max size for file uploads (/admin, /webmail)
client_max_body_size 10G;

proxy_pass http://varnish;
if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range, X-CSRF-Token';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';


if ($request_method = OPTIONS)
return 204;




location = /50x.html
root html;












share|improve this question






















  • could you show us how the config looks like when Ansible replaced the variables?

    – unNamed
    Mar 29 at 7:32















0















My nginx version: nginx/1.4.6



I have an issue enabling CORS for multiple subdomains. I checked https://gist.github.com/algal/5480916 and http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/ but both solutions doesn't work for me.



It looks like the regex



if ($http_origin ~* (.*.mydomain.com)) 
set $cors "true";



is not matching and $cors is not set to "true" and therefor add_header 'Access-Control-Allow-Origin' "$http_origin" won't be executed.



I also tried with regex




$http_origin ~* (https?://.*.mydomain.com)




or




$http_origin ~* https?://.*.mydomain.com




But in either case the regex doesn't match and $cors will never set to "true".



What am I missing?



My nginx configuration - domain name in curly braces (is getting replaced by Ansible):



upstream varnish 
server localhost:80;


server
listen 443 default;
server_name vhost;

ssl on;
ssl_certificate /etc/ssl/certs/ssl.domain.crt;
ssl_certificate_key /etc/ssl/private/domain.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;

# workaround remote exploit. Fixed in 1.5.0, 1.4.1
#
# http://mailman.nginx.org/pipermail/nginx-announce/2013/000112.html
if ($http_transfer_encoding ~* chunked)
return 444;


proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;

proxy_redirect off;

# CORS
set $cors "";
if ($http_origin ~* (.*.domain))
set $cors "true";


location /
# Set the max size for file uploads (/admin, /webmail)
client_max_body_size 10G;

proxy_pass http://varnish;
if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range, X-CSRF-Token';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';


if ($request_method = OPTIONS)
return 204;




location = /50x.html
root html;












share|improve this question






















  • could you show us how the config looks like when Ansible replaced the variables?

    – unNamed
    Mar 29 at 7:32













0












0








0








My nginx version: nginx/1.4.6



I have an issue enabling CORS for multiple subdomains. I checked https://gist.github.com/algal/5480916 and http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/ but both solutions doesn't work for me.



It looks like the regex



if ($http_origin ~* (.*.mydomain.com)) 
set $cors "true";



is not matching and $cors is not set to "true" and therefor add_header 'Access-Control-Allow-Origin' "$http_origin" won't be executed.



I also tried with regex




$http_origin ~* (https?://.*.mydomain.com)




or




$http_origin ~* https?://.*.mydomain.com




But in either case the regex doesn't match and $cors will never set to "true".



What am I missing?



My nginx configuration - domain name in curly braces (is getting replaced by Ansible):



upstream varnish 
server localhost:80;


server
listen 443 default;
server_name vhost;

ssl on;
ssl_certificate /etc/ssl/certs/ssl.domain.crt;
ssl_certificate_key /etc/ssl/private/domain.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;

# workaround remote exploit. Fixed in 1.5.0, 1.4.1
#
# http://mailman.nginx.org/pipermail/nginx-announce/2013/000112.html
if ($http_transfer_encoding ~* chunked)
return 444;


proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;

proxy_redirect off;

# CORS
set $cors "";
if ($http_origin ~* (.*.domain))
set $cors "true";


location /
# Set the max size for file uploads (/admin, /webmail)
client_max_body_size 10G;

proxy_pass http://varnish;
if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range, X-CSRF-Token';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';


if ($request_method = OPTIONS)
return 204;




location = /50x.html
root html;












share|improve this question














My nginx version: nginx/1.4.6



I have an issue enabling CORS for multiple subdomains. I checked https://gist.github.com/algal/5480916 and http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/ but both solutions doesn't work for me.



It looks like the regex



if ($http_origin ~* (.*.mydomain.com)) 
set $cors "true";



is not matching and $cors is not set to "true" and therefor add_header 'Access-Control-Allow-Origin' "$http_origin" won't be executed.



I also tried with regex




$http_origin ~* (https?://.*.mydomain.com)




or




$http_origin ~* https?://.*.mydomain.com




But in either case the regex doesn't match and $cors will never set to "true".



What am I missing?



My nginx configuration - domain name in curly braces (is getting replaced by Ansible):



upstream varnish 
server localhost:80;


server
listen 443 default;
server_name vhost;

ssl on;
ssl_certificate /etc/ssl/certs/ssl.domain.crt;
ssl_certificate_key /etc/ssl/private/domain.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;

# workaround remote exploit. Fixed in 1.5.0, 1.4.1
#
# http://mailman.nginx.org/pipermail/nginx-announce/2013/000112.html
if ($http_transfer_encoding ~* chunked)
return 444;


proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;

proxy_redirect off;

# CORS
set $cors "";
if ($http_origin ~* (.*.domain))
set $cors "true";


location /
# Set the max size for file uploads (/admin, /webmail)
client_max_body_size 10G;

proxy_pass http://varnish;
if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range, X-CSRF-Token';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';


if ($request_method = OPTIONS)
return 204;




location = /50x.html
root html;









nginx






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 19 at 14:01









StandardNerdStandardNerd

503




503












  • could you show us how the config looks like when Ansible replaced the variables?

    – unNamed
    Mar 29 at 7:32

















  • could you show us how the config looks like when Ansible replaced the variables?

    – unNamed
    Mar 29 at 7:32
















could you show us how the config looks like when Ansible replaced the variables?

– unNamed
Mar 29 at 7:32





could you show us how the config looks like when Ansible replaced the variables?

– unNamed
Mar 29 at 7:32










2 Answers
2






active

oldest

votes


















0














Try moving the check for $http_origin into your location block.



You can see the same in the first example link you gave.



The variable is probably first filled when the location block is called.






share|improve this answer























  • moving the check for $http_origin into your location block doesn't change anything

    – StandardNerd
    Mar 28 at 16:05


















0














You can get around the limitation of only one subdomain by using this clever workaround that will allow all subdomains:



server 

root /path/to/your/stuff;

index index.html index.htm;

set $cors "";

if ($http_origin ~* (.*.yoursweetdomain.com))
set $cors "true";


server_name yoursweetdomain.com;

location /

if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';



if ($request_method = OPTIONS)
return 204;






Credit: http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/






share|improve this answer








New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

    – StandardNerd
    yesterday











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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f958965%2fnginx-enabling-cors-for-multiple-subdomains%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









0














Try moving the check for $http_origin into your location block.



You can see the same in the first example link you gave.



The variable is probably first filled when the location block is called.






share|improve this answer























  • moving the check for $http_origin into your location block doesn't change anything

    – StandardNerd
    Mar 28 at 16:05















0














Try moving the check for $http_origin into your location block.



You can see the same in the first example link you gave.



The variable is probably first filled when the location block is called.






share|improve this answer























  • moving the check for $http_origin into your location block doesn't change anything

    – StandardNerd
    Mar 28 at 16:05













0












0








0







Try moving the check for $http_origin into your location block.



You can see the same in the first example link you gave.



The variable is probably first filled when the location block is called.






share|improve this answer













Try moving the check for $http_origin into your location block.



You can see the same in the first example link you gave.



The variable is probably first filled when the location block is called.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 26 at 8:58









unNamedunNamed

1216




1216












  • moving the check for $http_origin into your location block doesn't change anything

    – StandardNerd
    Mar 28 at 16:05

















  • moving the check for $http_origin into your location block doesn't change anything

    – StandardNerd
    Mar 28 at 16:05
















moving the check for $http_origin into your location block doesn't change anything

– StandardNerd
Mar 28 at 16:05





moving the check for $http_origin into your location block doesn't change anything

– StandardNerd
Mar 28 at 16:05













0














You can get around the limitation of only one subdomain by using this clever workaround that will allow all subdomains:



server 

root /path/to/your/stuff;

index index.html index.htm;

set $cors "";

if ($http_origin ~* (.*.yoursweetdomain.com))
set $cors "true";


server_name yoursweetdomain.com;

location /

if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';



if ($request_method = OPTIONS)
return 204;






Credit: http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/






share|improve this answer








New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

    – StandardNerd
    yesterday















0














You can get around the limitation of only one subdomain by using this clever workaround that will allow all subdomains:



server 

root /path/to/your/stuff;

index index.html index.htm;

set $cors "";

if ($http_origin ~* (.*.yoursweetdomain.com))
set $cors "true";


server_name yoursweetdomain.com;

location /

if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';



if ($request_method = OPTIONS)
return 204;






Credit: http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/






share|improve this answer








New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

    – StandardNerd
    yesterday













0












0








0







You can get around the limitation of only one subdomain by using this clever workaround that will allow all subdomains:



server 

root /path/to/your/stuff;

index index.html index.htm;

set $cors "";

if ($http_origin ~* (.*.yoursweetdomain.com))
set $cors "true";


server_name yoursweetdomain.com;

location /

if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';



if ($request_method = OPTIONS)
return 204;






Credit: http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/






share|improve this answer








New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










You can get around the limitation of only one subdomain by using this clever workaround that will allow all subdomains:



server 

root /path/to/your/stuff;

index index.html index.htm;

set $cors "";

if ($http_origin ~* (.*.yoursweetdomain.com))
set $cors "true";


server_name yoursweetdomain.com;

location /

if ($cors = "true")
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';



if ($request_method = OPTIONS)
return 204;






Credit: http://rustyrazorblade.com/post/2013/2013-10-31-cors-with-wildcard-domains-and-nginx/







share|improve this answer








New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered yesterday









kintsukuroikintsukuroi

1




1




New contributor




kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






kintsukuroi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

    – StandardNerd
    yesterday

















  • did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

    – StandardNerd
    yesterday
















did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

– StandardNerd
yesterday





did you read my original post/question? In my first phrase I mentioned that this link/source doesn't work for me.

– StandardNerd
yesterday

















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f958965%2fnginx-enabling-cors-for-multiple-subdomains%23new-answer', 'question_page');

);

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







Popular posts from this blog

How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?