mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 02:05:22 -05:00
cd8693db40
Add generic POST gateway to handle samesite=lax session cookies GitOrigin-RevId: e50a0fde63659a77a047e545a22fba5339f16427
17 lines
486 B
JavaScript
17 lines
486 B
JavaScript
define(['base'], App =>
|
|
App.controller('PostGatewayController', function($scope) {
|
|
$scope.handleGateway = function() {
|
|
const { params } = JSON.parse($('#gateway-data').text())
|
|
params.viaGateway = 'true'
|
|
Object.keys(params).forEach(param => {
|
|
$('<input>')
|
|
.attr({
|
|
type: 'hidden',
|
|
name: param,
|
|
value: params[param]
|
|
})
|
|
.appendTo('#gateway')
|
|
})
|
|
$('#gateway').submit()
|
|
}
|
|
}))
|