davidguerreiro / evscalculator

Web application for professional pokemon players
https://evscalculator.com
0 stars 0 forks source link

Subdomains #12

Closed jaicab closed 8 years ago

jaicab commented 8 years ago

None of the subdomains are pointing to their specific folders. They also need to have this on every request before anything else happens. For now we're only allowing requests from evscalculator.com, so that's what requests will be limited to:

<IfModule mod_headers.c>
   SetEnvIfNoCase Origin "http(s)?:\/\/(www\.)?(api\.)?(evscalculator\.com)(:\d+)?$" AccessControlAllowOrigin=$0
   Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
</IfModule>

This should be placed in the root, in a .htaccess file.

jaicab commented 8 years ago

Subdomains are set and CORS is enabled.