Server | SSL | Metods | Server country code | Comments |
---|---|---|---|---|
[YaCDN][1] | ✅ | GET | EU | Unlimited size and unlimited requests (for now) |
[crossorigin.me][2] | ✅ | GET | US | Require Origin header 2MB size limit |
[cors-proxy.htmldriven][3] | ✅ | - | CZ | JSON response don't work well with binary |
[cors-proxy.taskcluster][4] | ✅ | POST | US | Only witelisted to taskcluster.net Can send any header/method |
[thingproxy][9] | ✅ | ANY | US | Limited to 100kb for both upload and download, max 10 req/sec |
[whateverorigin][10] | ❌ | GET | US | Only supports JSONP |
[cors.io][11] | ✅ | GET, HEAD | US | Only supports GET and HEAD request |
[gobetween][12] | ✅ | GET | US | Only supports GET requests |
#!/usr/bin/env node | |
const fs = require('fs'); | |
const path = require('path'); | |
const ts = require('typescript'); // Requires 'npm install typescript' | |
// --- Configuration --- | |
const DEFAULT_PROJECT_PATH = '.'; // Default to current directory | |
const EXCLUDED_DIRS = ['node_modules', 'dist', '.angular', '.vscode', '.git']; // Directories to skip | |
const COMPONENT_FILE_SUFFIX = '.component.ts'; |
# /------------------------------------------\ | |
# | don't forget to download the .tp file | | |
# | and place it in the user's directory :› | | |
# | | | |
# | also install lolcat: | | |
# | https://github.com/busyloop/lolcat | | |
# \------------------------------------------/ | |
alias test-passed='if [ "$?" -eq "0" ]; then lolcat ~/.tp -a -s 40 -d 2; fi;' |
//star blank Ionic project | |
ionic start walk sidemenu --type=angular | |
//change to Ionic project folder | |
cd walk | |
//add android platform | |
ionic cordova platform add android | |
//remove Ionic webview |
Angular CLI version | Angular version | Node.js version | TypeScript version | RxJS version | |
---|---|---|---|---|---|
~16.0.0 | ~16.0.0 | ^16.13.0 || ^18.10.0 | >=4.9.5 <5.1.0 | ^6.5.5 || ^7.4.0 | |
~15.2.0 | ~15.2.0 | ^14.20.0 || ^16.13.0 || ^18.10.0 | >=4.8.4 <5.0.0 | ^6.5.5 || ^7.4.0 | |
~15.1.0 | ~15.1.0 | ^14.20.0 || ^16.13.0 || ^18.10.0 | >=4.8.4 <5.0.0 | ^6.5.5 || ^7.4.0 | |
~15.0.5 | ~15.0.4 | ^14.20.0 || ^16.13.0 || ^18.10.0 | ~4.8.4 | ^6.5.5 || ^7.4.0 | |
~14.3.0 | ~14.3.0 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.9.0 | ^6.5.5 || ^7.4.0 | |
~14.2.0 | ~14.2.0 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.9.0 | ^6.5.5 || ^7.4.0 | |
~14.1.3 | ~14.1.3 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.8.0 | ^6.5.5 || ^7.4.0 | |
~14.0.7 | ~14.0.7 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.8.0 | ^6.5.5 || ^7.4.0 | |
~13.3.0 | ~13.3.0 | ^12.20.2 || ^14.15.0 || ^16.10.0 | >=4.4.4 <4.7.0 | ^6.5.5 || ^7.4.0 |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost
. This is primarily set by the header:
Access-Control-Allow-Origin
Pode-se afirmar que no momento Promises são a forma mais "padrão" de se tratar com
assincronismo no JS. Para quem trabalha com javascript, conhecê-las é essencial.
Uma dificuldade comum é que esta API tem uma curva de aprendizado um tanto acentuada de início, especialmente
se comparado com as alternativas mais antigas: callbacks e o módulo async
. No meu caso, levei ao menos uns 3
meses pra "cair a ficha".
Tentarei aqui fazer uma introdução ao assunto, com foco em passar muitos exemplos. Algumas vezes posso sacrificar
require APPPATH.'libraries/REST_Controller.php'; | |
class API_Controller extends REST_Controller | |
{ | |
/** | |
* Parse the DELETE request arguments [HACK] | |
* | |
* @access protected |
@REM This file detects the current enabled PHP version of wampserver (http://www.wampserver.com/) and executes the enabled php.exe and all parameters are passed | |
@REM Copy this file to WAMPSERVERPATH\bin\php | |
@REM Now you can add WAMPSERVERPATH\bin\php to your Windows Environment-Variable "PATH". Now you can use "php" global. For example "php -v". | |
@REM You can show the current PHP version with "php -v" | |
@setlocal enableextensions enabledelayedexpansion | |
@echo off | |
set serverPath="%~dp0\..\.." | |
set file="!serverPath!\wampmanager.conf" |
<?php | |
// Based on <https://github.com/mecha-cms/x.minify> | |
namespace x\minify\_ { // start namespace | |
$n = __NAMESPACE__; | |
\define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |