Una nota para el futuro
This commit is contained in:
parent
113498b4bf
commit
3e0b94fbce
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,10 @@ module Api
|
|||
#
|
||||
# En desarrollo devuelve el Origin enviado.
|
||||
#
|
||||
# XXX: Si el sitio tiene varias URLs, hay que devolver la más
|
||||
# similar al Origin o vamos a estar generando errores de CORS.
|
||||
#
|
||||
# @see {https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin}
|
||||
# @return [String]
|
||||
def return_origin
|
||||
Rails.env.production? ? Site.find_by(name: site_id).url : origin
|
||||
|
|
Loading…
Reference in a new issue