PHP code example of microwin7 / texture-provider
1. Go to this page and download the library: Download microwin7/texture-provider library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
microwin7 / texture-provider example snippets nginx
location /texture-provider/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Env-Vendor null;
proxy_set_header App-Url "http://$host/";
proxy_set_header Script-Path "texture-provider";
proxy_set_header Ecdsa-Id-Pub "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEJDi51DKs5f6ERSrDDjns00BkI963L9OS9wLA2Ak/nACZCgQma+FsTsbYtZQm4nk+rtabM8b9JgzSi3sPINb8fg==";
set $bearer_token "";
if ($request_uri ~ ^/texture-provider/api/) {
set $bearer_token "";
}
proxy_set_header Bearer-Token $bearer_token;
proxy_pass http://dockerTextureProvider/;
}
nginx
upstream dockerTextureProvider {
server 127.0.0.1:29300;
}
server {
listen 80;
server_name textures.ВАШ_ДОМЕН;
charset utf-8;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Env-Vendor null;
proxy_set_header App-Url "http://$host/";
proxy_set_header Script-Path "";
proxy_set_header Ecdsa-Id-Pub "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEJDi51DKs5f6ERSrDDjns00BkI963L9OS9wLA2Ak/nACZCgQma+FsTsbYtZQm4nk+rtabM8b9JgzSi3sPINb8fg==";
set $bearer_token "";
if ($request_uri ~ ^/api/) {
set $bearer_token "";
}
proxy_set_header Bearer-Token $bearer_token;
proxy_pass http://dockerTextureProvider/;
}
}