Skip to content

Instantly share code, notes, and snippets.

@drbyte
Forked from poul-kg/valet.conf
Created October 18, 2017 16:23
Show Gist options
  • Save drbyte/cd2f506e9e2e0ff8c405cf4d9c3d533d to your computer and use it in GitHub Desktop.
Save drbyte/cd2f506e9e2e0ff8c405cf4d9c3d533d to your computer and use it in GitHub Desktop.

Revisions

  1. @poul-kg poul-kg revised this gist Oct 18, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion valet.conf
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # To enable CORS you should lines with CORS rules below
    # To enable CORS you should add lines with CORS rules below to your valet.conf file
    # Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
    # of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
    # after you edit your valet.conf do not forget to execute `valet restart`
  2. @poul-kg poul-kg revised this gist Oct 18, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions valet.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # To enable CORS you should lines with CORS rules below
    # Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
    # of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
    # after you edit your valet.conf do not forget to execute `valet restart`

    server {
    listen 80 default_server;
  3. @poul-kg poul-kg created this gist Oct 18, 2017.
    52 changes: 52 additions & 0 deletions valet.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    # To enable CORS you should lines with CORS rules below
    # Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
    # of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory

    server {
    listen 80 default_server;
    root /;
    charset utf-8;
    client_max_body_size 128M;

    location /41c270e4-5535-4daa-b23e-c269744c2f45/ {
    internal;
    alias /;
    # CORS Rules
    add_header Access-Control-Allow-Origin *;
    add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE';
    add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization';
    # END of CORS Rules #
    try_files $uri $uri/;
    }

    location / {
    # CORS Rules
    add_header Access-Control-Allow-Origin *;
    add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE';
    add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization';
    # END of CORS Rules #
    rewrite ^ /Users/pavel/.composer/vendor/laravel/valet/server.php last;
    }

    access_log off;
    error_log /Users/pavel/.valet/Log/nginx-error.log;

    error_page 404 /Users/pavel/.composer/vendor/laravel/valet/server.php;

    location ~ \.php$ {
    # CORS Rules
    add_header Access-Control-Allow-Origin *;
    add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE';
    add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization';
    # END of CORS Rules #
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/Users/pavel/.valet/valet.sock;
    fastcgi_index /Users/pavel/.composer/vendor/laravel/valet/server.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME /Users/pavel/.composer/vendor/laravel/valet/server.php;
    }

    location ~ /\.ht {
    deny all;
    }
    }