is it possible to map all requests to a route under a certain path i.e ‘/api/**’ to a different app in pcf?

As the title suggests, I have a frontend app and a backend api. Each with their own manifest running in pcf in their own containers. They are on the same origin. I want to route all api requests to the backend api, and every other request to the frontend app. This is currently possible via map-route cmd in pcf cli or app manager. For every endpoint I have in my backend api, I map the endpoint to a route ‘api/path1’, ‘api/path2’, ‘api/path3’, ‘api/path4’, ‘api/path5′, api/path6’, ‘api/path7’, ‘api/path8’, ‘api/path9’……………. except the only problem is I have to list every single endpoint I want mapped. Wildcards are not least I haven’t been able to get them to work. Any ideas?

Laravel api. Как сделать необязательный роут, как в примере

Подскажите, как в Laravel сделать route как тут:

Можно обратиться и без _limit=2 и без ?_page=3&_limit=2

Код, как я сделал:

Route::get('/articles/_page={currentPage?}&_limit={limit?}', "Controller"); 

Пробывал вот так: /articles?_page={currentPage?}&_limit={limit?}.
Да и другими разными способами, не знаю как объявить эту вторую часть как не обяз. параметр

При /api/articles... не обращается.

Best way to make insert data in logs web API. REST or WebSockets

I want to make a centralized log web API, so it will have a large amount of data per seconds. the logs will comming from others WEB API

I was thinking if i make the REST API, all of the POST made need to return an answer and maybe can overload the server with so much request.

then I think in webSockets, establish a communication with the API that made the logs and only send data without necessary responses but I don’t know how reliable are that.

So in this case, what method would be fastest and more reliable? Sorry if my english isn’t good 🙁


AutoFill and ‘Payment Request API’ behavior in chrome

According to this guidance in Chrome Help

Chrome has 2 mechanisms that support saving the payment methods for the browser’s user: – Autofill and the Payment Request API
My Questions

  • what are the difference between them from user experience?
  • When using basic card (credit or debit card) what is the card number stored for continues use, is it stored in some chrome data repository where all the passwords to enter websites is stored?

The notification work just fine when sent from the firebase console, but don’t work when sent from the API. Even when the result displays a success: [on hold]

The notification work just fine when sent from the firebase console, but don’t work when sent from the API. Even when the result displays a success:


APÍ django-storages dropbox erro url pattern

Eu estou utilizando a seguinte API:

Eu tenho exatamente tudo configurado, desde a lib instalada até as configurações do

A lib ‘storages’ no INSTALLED_APPS e as três variáveis de conexão com o dropbox:

DEFAULT_FILE_STORAGE = ‘storages.backends.dropbox.DropBoxStorage’ DROPBOX_OAUTH2_TOKEN = ‘meu_token’ DROPBOX_ROOT_PATH = ‘/media/’

Eu quero que os campos FileField e ImageField façam upload de uma imagem ou arquivo e este seja salvo na pasta /media/ do projeto e do dropbox, mantendo a imagem em produção, tendo a App criada e configurada para ser app_folder.

Se eu retirar as três variáveis de configuração do dropbox e tentar modificar ou adicionar uma imagem pelo django admin é possível, porém, quando retorno as variáveis e tento novamente, aparece o seguinte erro:

ValidationError at /admin/catalog/product/6/change/ 

‘C:/media/products/cortina-city.jpg’ did not match pattern ‘(/(.|[\r\n])|id:.)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)’

Dá erro também no da lib:

C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\storages\backends\ in exists         return bool(self.client.files_get_metadata(self._full_path(name))) ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\ in files_get_metadata                                include_property_groups) ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\ in __init__         self.path = path ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\ in path     val = self._path_validator.validate(val) ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\ in validate                               % (val, self.pattern))  

Eu entendo que não está identificando o padrão do get da url. Imagino que o C: não deve ir junto na string e está indo, ou seja, ‘C:/media/products/..”.

Como resolver isso?