Fix CORS: allow X-Timestamp header
This commit is contained in:
parent
c12d09fd1d
commit
69127d3059
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
env:
|
||||
REPO_DIR: "/workspace/ruspet_portal_back"
|
||||
REPO_URL: "https://${{ github.actor }}:${{ github.token }}@72.56.235.246.nip.io/gitea/romanskijdev/ruspet_portal_back.git"
|
||||
REPO_URL: "https://${{ github.actor }}:${{ github.token }}@git.ruspet-preforma.ru/romanskijdev/ruspet_portal_back.git"
|
||||
BACKUP_DIR: "/tmp/deploy_backups"
|
||||
|
||||
TELEGRAM_SERVICE: "telegram_service"
|
||||
|
|
@ -28,7 +28,6 @@ jobs:
|
|||
echo "Branch: ${{ github.ref }}"
|
||||
echo "Commit: ${{ github.sha }}"
|
||||
echo "Author: ${{ github.actor }}"
|
||||
echo "Message: ${{ github.event.head_commit.message }}"
|
||||
echo "Time: $(date '+%Y-%m-%d %H:%M:%S')"
|
||||
echo "Runner: $(hostname)"
|
||||
echo "User: $(whoami)"
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ func initBaseApiRouter(ipc *typesm.InternalProviderControl) (*chi.Mux, error) {
|
|||
corsOptions := cors.New(cors.Options{
|
||||
AllowedOrigins: ipc.Config.Server.RESTAdminService.Cors.AllowedOrigins, // Список разрешенных origin
|
||||
AllowedMethods: []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch, http.MethodOptions},
|
||||
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "ApiKey", "x-device-id"},
|
||||
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "ApiKey", "x-device-id", "X-Timestamp"},
|
||||
ExposedHeaders: []string{"Link", "Cache-Control"},
|
||||
AllowCredentials: false,
|
||||
MaxAge: 300, // Максимальное время жизни предварительных запросов в секундах
|
||||
|
|
|
|||
Loading…
Reference in New Issue