balderdashy/sails

How to handle a route with a dot in route param

Open

#6.954 aberto em 25 de fev. de 2020

Ver no GitHub
 (10 comments) (0 reactions) (0 assignees)JavaScript (1.953 forks)batch import
does this answer your question?help wanted

Métricas do repositório

Stars
 (22.778 stars)
Métricas de merge de PR
 (Mesclagem média 23h 44m) (1 fundiu PR em 30d)

Description

Node version: 10.19.0 Sails version (sails): 1.2.3

Hi,

I have a controller which serves an image. I am trying to get this route to work

/content/26/image.png

It responses 404 but work with

/content/26/image.png/

I got it to work with a custom inline route ( fn: async function (req, res)) but I want access control for this route.

Many thanks in advance and kindest regards

Guia do colaborador