mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 01:46:21 +00:00
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